Skip to content

Instantly share code, notes, and snippets.

@Gankra
Created April 25, 2018 20:20
Show Gist options
  • Save Gankra/5f27bb9a9679386445b2497e6627309e to your computer and use it in GitHub Desktop.
Save Gankra/5f27bb9a9679386445b2497e6627309e to your computer and use it in GitHub Desktop.
diff --git a/gfx/webrender_bindings/cbindgen.toml b/gfx/webrender_bindings/cbindgen.toml
index bd7a039..9dc1102 100644
--- a/gfx/webrender_bindings/cbindgen.toml
+++ b/gfx/webrender_bindings/cbindgen.toml
@@ -30,7 +30,7 @@ derive_eq = true
[enum]
add_sentinel = true
-# derive_helper_methods = true
+derive_helper_methods = true
[defines]
"target_os = windows" = "XP_WIN"
diff --git a/gfx/webrender_bindings/webrender_ffi_generated.h b/gfx/webrender_bindings/webrender_ffi_generated.h
index 5f9e1fc..540ceb9 100644
--- a/gfx/webrender_bindings/webrender_ffi_generated.h
+++ b/gfx/webrender_bindings/webrender_ffi_generated.h
@@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-/* Generated with cbindgen:0.5.2 */
+/* Generated with cbindgen:0.6.0 */
/* DO NOT MODIFY THIS MANUALLY! This file was generated using cbindgen.
* To generate this file:
@@ -739,6 +739,27 @@ struct GlyphRasterSpace {
union {
Local_Body local;
};
+
+ static GlyphRasterSpace Local(float const& a0) {
+ GlyphRasterSpace result;
+ result.local._0 = a0;
+ result.tag = Tag::Local;
+ return result;
+ }
+
+ static GlyphRasterSpace Screen() {
+ GlyphRasterSpace result;
+ result.tag = Tag::Screen;
+ return result;
+ }
+
+ bool IsLocal() const {
+ return tag == Tag::Local;
+ }
+
+ bool IsScreen() const {
+ return tag == Tag::Screen;
+ }
};
struct FontInstanceKey {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment