Bug 1368483 - Pass WrColor in wr_api_set_root_display_list() r=nical
authorsotaro <sotaro.ikeda.g@gmail.com>
Thu, 01 Jun 2017 09:53:58 +0900
changeset 361808 f9da3c04ca82ffb9970dfca9b24960d5fe7135f1
parent 361807 cf6ba2cbdea2b042d59c5d0c2817116320ac0352
child 361809 7d2289e277825e4e0e5ecc7b1c8bd3962cf0a124
push id31944
push userryanvm@gmail.com
push dateThu, 01 Jun 2017 16:44:22 +0000
treeherdermozilla-central@0e9853e31da9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs1368483
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1368483 - Pass WrColor in wr_api_set_root_display_list() r=nical
gfx/webrender_bindings/WebRenderAPI.cpp
gfx/webrender_bindings/src/bindings.rs
gfx/webrender_bindings/webrender_ffi_generated.h
--- a/gfx/webrender_bindings/WebRenderAPI.cpp
+++ b/gfx/webrender_bindings/WebRenderAPI.cpp
@@ -211,16 +211,17 @@ WebRenderAPI::SetRootDisplayList(gfx::Co
                                  LayerSize aViewportSize,
                                  WrPipelineId pipeline_id,
                                  const WrSize& content_size,
                                  WrBuiltDisplayListDescriptor dl_descriptor,
                                  uint8_t *dl_data,
                                  size_t dl_size)
 {
     wr_api_set_root_display_list(mWrApi,
+                                 ToWrColor(aBgColor),
                                  aEpoch,
                                  aViewportSize.width, aViewportSize.height,
                                  pipeline_id,
                                  content_size,
                                  dl_descriptor,
                                  dl_data,
                                  dl_size);
 }
--- a/gfx/webrender_bindings/src/bindings.rs
+++ b/gfx/webrender_bindings/src/bindings.rs
@@ -1004,52 +1004,56 @@ pub extern "C" fn wr_api_set_window_para
                                                width: i32,
                                                height: i32) {
     let size = DeviceUintSize::new(width as u32, height as u32);
     api.set_window_parameters(size, DeviceUintRect::new(DeviceUintPoint::new(0, 0), size));
 }
 
 #[no_mangle]
 pub unsafe extern "C" fn wr_api_set_root_display_list(api: &mut WrAPI,
+                                                      color: WrColor,
                                                       epoch: WrEpoch,
                                                       viewport_width: f32,
                                                       viewport_height: f32,
                                                       pipeline_id: WrPipelineId,
                                                       content_size: WrSize,
                                                       dl_descriptor: WrBuiltDisplayListDescriptor,
                                                       dl_data: *mut u8,
                                                       dl_size: usize) {
-    let root_background_color = ColorF::new(0.3, 0.0, 0.0, 1.0);
+    let color = if color.a == 0.0 {
+        None
+    } else {
+        Some(color.into())
+    };
     // See the documentation of set_display_list in api.rs. I don't think
     // it makes a difference in gecko at the moment(until APZ is figured out)
     // but I suppose it is a good default.
     let preserve_frame_state = true;
 
     let dl_slice = make_slice(dl_data, dl_size);
     let mut dl_vec = Vec::new();
     // XXX: see if we can get rid of the copy here
     dl_vec.extend_from_slice(dl_slice);
     let dl = BuiltDisplayList::from_data(dl_vec, dl_descriptor);
 
-    api.set_display_list(Some(root_background_color),
+    api.set_display_list(color,
                          epoch,
                          LayoutSize::new(viewport_width, viewport_height),
                          (pipeline_id, content_size.into(), dl),
                          preserve_frame_state);
 }
 
 #[no_mangle]
 pub unsafe extern "C" fn wr_api_clear_root_display_list(api: &mut WrAPI,
                                                         epoch: WrEpoch,
                                                         pipeline_id: WrPipelineId) {
-    let root_background_color = ColorF::new(0.3, 0.0, 0.0, 1.0);
     let preserve_frame_state = true;
     let frame_builder = WebRenderFrameBuilder::new(pipeline_id, WrSize::zero());
 
-    api.set_display_list(Some(root_background_color),
+    api.set_display_list(None,
                          epoch,
                          LayoutSize::new(0.0, 0.0),
                          frame_builder.dl_builder.finalize(),
                          preserve_frame_state);
 }
 
 #[no_mangle]
 pub extern "C" fn wr_api_generate_frame(api: &mut WrAPI) {
--- a/gfx/webrender_bindings/webrender_ffi_generated.h
+++ b/gfx/webrender_bindings/webrender_ffi_generated.h
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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.1.7 */
+/* Generated with cbindgen:0.1.10 */
 
 /* DO NOT MODIFY THIS MANUALLY! This file was generated using cbindgen.
  * To generate this file, clone `https://github.com/rlhunt/cbindgen` or run `cargo install cbindgen`,
  * then run `cbindgen gfx/webrender_bindings/ -o gfx/webrender_bindings/webrender_ffi_generated.h` */
 
 #include <stdint.h>
 
 extern "C" {
@@ -111,16 +111,22 @@ enum class WrYuvColorSpace : uint32_t {
   Rec601 = 0,
   Rec709 = 1,
 
   Sentinel /* this must be last for serialization purposes. */
 };
 
 struct WrAPI;
 
+struct WrRenderedEpochs;
+
+struct WrRenderer;
+
+struct WrState;
+
 struct WrImageKey {
   uint32_t mNamespace;
   uint32_t mHandle;
 
   bool operator==(const WrImageKey& aOther) const {
     return mNamespace == aOther.mNamespace &&
            mHandle == aOther.mHandle;
   }
@@ -138,17 +144,17 @@ struct WrImageDescriptor {
            width == aOther.width &&
            height == aOther.height &&
            stride == aOther.stride &&
            is_opaque == aOther.is_opaque;
   }
 };
 
 struct WrByteSlice {
-  const uint8_t* buffer;
+  const uint8_t *buffer;
   size_t len;
 
   bool operator==(const WrByteSlice& aOther) const {
     return buffer == aOther.buffer &&
            len == aOther.len;
   }
 };
 
@@ -189,18 +195,16 @@ struct WrPipelineId {
   uint32_t mHandle;
 
   bool operator==(const WrPipelineId& aOther) const {
     return mNamespace == aOther.mNamespace &&
            mHandle == aOther.mHandle;
   }
 };
 
-struct WrState;
-
 struct WrSize {
   float width;
   float height;
 
   bool operator==(const WrSize& aOther) const {
     return width == aOther.width &&
            height == aOther.height;
   }
@@ -214,17 +218,17 @@ struct WrBuiltDisplayListDescriptor {
   bool operator==(const WrBuiltDisplayListDescriptor& aOther) const {
     return display_list_items_size == aOther.display_list_items_size &&
            builder_start_time == aOther.builder_start_time &&
            builder_finish_time == aOther.builder_finish_time;
   }
 };
 
 struct WrVecU8 {
-  uint8_t* data;
+  uint8_t *data;
   size_t length;
   size_t capacity;
 
   bool operator==(const WrVecU8& aOther) const {
     return data == aOther.data &&
            length == aOther.length &&
            capacity == aOther.capacity;
   }
@@ -258,16 +262,30 @@ struct WrIdNamespace {
   bool operator<(const WrIdNamespace& aOther) const {
     return mHandle < aOther.mHandle;
   }
   bool operator<=(const WrIdNamespace& aOther) const {
     return mHandle <= aOther.mHandle;
   }
 };
 
+struct WrColor {
+  float r;
+  float g;
+  float b;
+  float a;
+
+  bool operator==(const WrColor& aOther) const {
+    return r == aOther.r &&
+           g == aOther.g &&
+           b == aOther.b &&
+           a == aOther.a;
+  }
+};
+
 struct WrRect {
   float x;
   float y;
   float width;
   float height;
 
   bool operator==(const WrRect& aOther) const {
     return x == aOther.x &&
@@ -294,30 +312,16 @@ struct WrBorderWidths {
   bool operator==(const WrBorderWidths& aOther) const {
     return left == aOther.left &&
            top == aOther.top &&
            right == aOther.right &&
            bottom == aOther.bottom;
   }
 };
 
-struct WrColor {
-  float r;
-  float g;
-  float b;
-  float a;
-
-  bool operator==(const WrColor& aOther) const {
-    return r == aOther.r &&
-           g == aOther.g &&
-           b == aOther.b &&
-           a == aOther.a;
-  }
-};
-
 struct WrBorderSide {
   WrColor color;
   WrBorderStyle style;
 
   bool operator==(const WrBorderSide& aOther) const {
     return color == aOther.color &&
            style == aOther.style;
   }
@@ -425,17 +429,17 @@ struct WrGlyphInstance {
 
   bool operator==(const WrGlyphInstance& aOther) const {
     return index == aOther.index &&
            point == aOther.point;
   }
 };
 
 struct MutByteSlice {
-  uint8_t* buffer;
+  uint8_t *buffer;
   size_t len;
 
   bool operator==(const MutByteSlice& aOther) const {
     return buffer == aOther.buffer &&
            len == aOther.len;
   }
 };
 
@@ -448,28 +452,24 @@ struct WrWindowId {
   bool operator<(const WrWindowId& aOther) const {
     return mHandle < aOther.mHandle;
   }
   bool operator<=(const WrWindowId& aOther) const {
     return mHandle <= aOther.mHandle;
   }
 };
 
-struct WrRenderedEpochs;
-
-struct WrRenderer;
-
 struct WrExternalImage {
   WrExternalImageType image_type;
   uint32_t handle;
   float u0;
   float v0;
   float u1;
   float v1;
-  const uint8_t* buff;
+  const uint8_t *buff;
   size_t size;
 
   bool operator==(const WrExternalImage& aOther) const {
     return image_type == aOther.image_type &&
            handle == aOther.handle &&
            u0 == aOther.u0 &&
            v0 == aOther.v0 &&
            u1 == aOther.u1 &&
@@ -479,435 +479,436 @@ struct WrExternalImage {
   }
 };
 
 typedef WrExternalImage (*LockExternalImageCallback)(void*, WrExternalImageId, uint8_t);
 
 typedef void (*UnlockExternalImageCallback)(void*, WrExternalImageId, uint8_t);
 
 struct WrExternalImageHandler {
-  void* external_image_obj;
+  void *external_image_obj;
   LockExternalImageCallback lock_func;
   UnlockExternalImageCallback unlock_func;
 
   bool operator==(const WrExternalImageHandler& aOther) const {
     return external_image_obj == aOther.external_image_obj &&
            lock_func == aOther.lock_func &&
            unlock_func == aOther.unlock_func;
   }
 };
 
 /* DO NOT MODIFY THIS MANUALLY! This file was generated using cbindgen.
  * To generate this file, clone `https://github.com/rlhunt/cbindgen` or run `cargo install cbindgen`,
  * then run `cbindgen gfx/webrender_bindings/ -o gfx/webrender_bindings/webrender_ffi_generated.h` */
 
 WR_INLINE
-void wr_api_add_blob_image(WrAPI* aApi,
+void wr_api_add_blob_image(WrAPI *aApi,
                            WrImageKey aImageKey,
-                           const WrImageDescriptor* aDescriptor,
+                           const WrImageDescriptor *aDescriptor,
                            WrByteSlice aBytes)
 WR_FUNC;
 
 WR_INLINE
-void wr_api_add_external_image(WrAPI* aApi,
+void wr_api_add_external_image(WrAPI *aApi,
                                WrImageKey aImageKey,
-                               const WrImageDescriptor* aDescriptor,
+                               const WrImageDescriptor *aDescriptor,
                                WrExternalImageId aExternalImageId,
                                WrExternalImageBufferType aBufferType,
                                uint8_t aChannelIndex)
 WR_FUNC;
 
 WR_INLINE
-void wr_api_add_external_image_buffer(WrAPI* aApi,
+void wr_api_add_external_image_buffer(WrAPI *aApi,
                                       WrImageKey aImageKey,
-                                      const WrImageDescriptor* aDescriptor,
+                                      const WrImageDescriptor *aDescriptor,
                                       WrExternalImageId aExternalImageId)
 WR_FUNC;
 
 WR_INLINE
-void wr_api_add_image(WrAPI* aApi,
+void wr_api_add_image(WrAPI *aApi,
                       WrImageKey aImageKey,
-                      const WrImageDescriptor* aDescriptor,
+                      const WrImageDescriptor *aDescriptor,
                       WrByteSlice aBytes)
 WR_FUNC;
 
 WR_INLINE
-void wr_api_add_raw_font(WrAPI* aApi,
+void wr_api_add_raw_font(WrAPI *aApi,
                          WrFontKey aKey,
-                         uint8_t* aFontBuffer,
+                         uint8_t *aFontBuffer,
                          size_t aBufferSize,
                          uint32_t aIndex)
 WR_FUNC;
 
 WR_INLINE
-void wr_api_clear_root_display_list(WrAPI* aApi,
+void wr_api_clear_root_display_list(WrAPI *aApi,
                                     WrEpoch aEpoch,
                                     WrPipelineId aPipelineId)
 WR_FUNC;
 
 WR_INLINE
-void wr_api_delete(WrAPI* aApi)
+void wr_api_delete(WrAPI *aApi)
 WR_DESTRUCTOR_SAFE_FUNC;
 
 WR_INLINE
-void wr_api_delete_font(WrAPI* aApi,
+void wr_api_delete_font(WrAPI *aApi,
                         WrFontKey aKey)
 WR_FUNC;
 
 WR_INLINE
-void wr_api_delete_image(WrAPI* aApi,
+void wr_api_delete_image(WrAPI *aApi,
                          WrImageKey aKey)
 WR_FUNC;
 
 WR_INLINE
-void wr_api_finalize_builder(WrState* aState,
-                             WrSize* aContentSize,
-                             WrBuiltDisplayListDescriptor* aDlDescriptor,
-                             WrVecU8* aDlData)
+void wr_api_finalize_builder(WrState *aState,
+                             WrSize *aContentSize,
+                             WrBuiltDisplayListDescriptor *aDlDescriptor,
+                             WrVecU8 *aDlData)
 WR_FUNC;
 
 WR_INLINE
-void wr_api_generate_frame(WrAPI* aApi)
+void wr_api_generate_frame(WrAPI *aApi)
 WR_FUNC;
 
 WR_INLINE
-void wr_api_generate_frame_with_properties(WrAPI* aApi,
-                                           const WrOpacityProperty* aOpacityArray,
+void wr_api_generate_frame_with_properties(WrAPI *aApi,
+                                           const WrOpacityProperty *aOpacityArray,
                                            size_t aOpacityCount,
-                                           const WrTransformProperty* aTransformArray,
+                                           const WrTransformProperty *aTransformArray,
                                            size_t aTransformCount)
 WR_FUNC;
 
 WR_INLINE
-WrIdNamespace wr_api_get_namespace(WrAPI* aApi)
+WrIdNamespace wr_api_get_namespace(WrAPI *aApi)
 WR_FUNC;
 
 WR_INLINE
-void wr_api_send_external_event(WrAPI* aApi,
+void wr_api_send_external_event(WrAPI *aApi,
                                 size_t aEvt)
 WR_DESTRUCTOR_SAFE_FUNC;
 
 WR_INLINE
-void wr_api_set_root_display_list(WrAPI* aApi,
+void wr_api_set_root_display_list(WrAPI *aApi,
+                                  WrColor aColor,
                                   WrEpoch aEpoch,
                                   float aViewportWidth,
                                   float aViewportHeight,
                                   WrPipelineId aPipelineId,
                                   WrSize aContentSize,
                                   WrBuiltDisplayListDescriptor aDlDescriptor,
-                                  uint8_t* aDlData,
+                                  uint8_t *aDlData,
                                   size_t aDlSize)
 WR_FUNC;
 
 WR_INLINE
-void wr_api_set_root_pipeline(WrAPI* aApi,
+void wr_api_set_root_pipeline(WrAPI *aApi,
                               WrPipelineId aPipelineId)
 WR_FUNC;
 
 WR_INLINE
-void wr_api_set_window_parameters(WrAPI* aApi,
+void wr_api_set_window_parameters(WrAPI *aApi,
                                   int32_t aWidth,
                                   int32_t aHeight)
 WR_FUNC;
 
 WR_INLINE
-void wr_api_update_image(WrAPI* aApi,
+void wr_api_update_image(WrAPI *aApi,
                          WrImageKey aKey,
-                         const WrImageDescriptor* aDescriptor,
+                         const WrImageDescriptor *aDescriptor,
                          WrByteSlice aBytes)
 WR_FUNC;
 
 WR_INLINE
-void wr_dp_begin(WrState* aState,
+void wr_dp_begin(WrState *aState,
                  uint32_t aWidth,
                  uint32_t aHeight)
 WR_FUNC;
 
 WR_INLINE
-void wr_dp_end(WrState* aState)
+void wr_dp_end(WrState *aState)
 WR_FUNC;
 
 WR_INLINE
-void wr_dp_pop_clip(WrState* aState)
+void wr_dp_pop_clip(WrState *aState)
 WR_FUNC;
 
 WR_INLINE
-void wr_dp_pop_scroll_layer(WrState* aState)
+void wr_dp_pop_scroll_layer(WrState *aState)
 WR_FUNC;
 
 WR_INLINE
-void wr_dp_pop_stacking_context(WrState* aState)
+void wr_dp_pop_stacking_context(WrState *aState)
 WR_FUNC;
 
 WR_INLINE
-void wr_dp_push_border(WrState* aState,
+void wr_dp_push_border(WrState *aState,
                        WrRect aRect,
                        WrClipRegionToken aClip,
                        WrBorderWidths aWidths,
                        WrBorderSide aTop,
                        WrBorderSide aRight,
                        WrBorderSide aBottom,
                        WrBorderSide aLeft,
                        WrBorderRadius aRadius)
 WR_FUNC;
 
 WR_INLINE
-void wr_dp_push_border_gradient(WrState* aState,
+void wr_dp_push_border_gradient(WrState *aState,
                                 WrRect aRect,
                                 WrClipRegionToken aClip,
                                 WrBorderWidths aWidths,
                                 WrPoint aStartPoint,
                                 WrPoint aEndPoint,
-                                const WrGradientStop* aStops,
+                                const WrGradientStop *aStops,
                                 size_t aStopsCount,
                                 WrGradientExtendMode aExtendMode,
                                 WrSideOffsets2Df32 aOutset)
 WR_FUNC;
 
 WR_INLINE
-void wr_dp_push_border_image(WrState* aState,
+void wr_dp_push_border_image(WrState *aState,
                              WrRect aRect,
                              WrClipRegionToken aClip,
                              WrBorderWidths aWidths,
                              WrImageKey aImage,
                              WrNinePatchDescriptor aPatch,
                              WrSideOffsets2Df32 aOutset,
                              WrRepeatMode aRepeatHorizontal,
                              WrRepeatMode aRepeatVertical)
 WR_FUNC;
 
 WR_INLINE
-void wr_dp_push_border_radial_gradient(WrState* aState,
+void wr_dp_push_border_radial_gradient(WrState *aState,
                                        WrRect aRect,
                                        WrClipRegionToken aClip,
                                        WrBorderWidths aWidths,
                                        WrPoint aCenter,
                                        WrSize aRadius,
-                                       const WrGradientStop* aStops,
+                                       const WrGradientStop *aStops,
                                        size_t aStopsCount,
                                        WrGradientExtendMode aExtendMode,
                                        WrSideOffsets2Df32 aOutset)
 WR_FUNC;
 
 WR_INLINE
-void wr_dp_push_box_shadow(WrState* aState,
+void wr_dp_push_box_shadow(WrState *aState,
                            WrRect aRect,
                            WrClipRegionToken aClip,
                            WrRect aBoxBounds,
                            WrPoint aOffset,
                            WrColor aColor,
                            float aBlurRadius,
                            float aSpreadRadius,
                            float aBorderRadius,
                            WrBoxShadowClipMode aClipMode)
 WR_FUNC;
 
 WR_INLINE
-void wr_dp_push_built_display_list(WrState* aState,
+void wr_dp_push_built_display_list(WrState *aState,
                                    WrBuiltDisplayListDescriptor aDlDescriptor,
                                    WrVecU8 aDlData)
 WR_FUNC;
 
 WR_INLINE
-void wr_dp_push_clip(WrState* aState,
+void wr_dp_push_clip(WrState *aState,
                      WrRect aClipRect,
-                     const WrImageMask* aMask)
+                     const WrImageMask *aMask)
 WR_FUNC;
 
 WR_INLINE
-WrClipRegionToken wr_dp_push_clip_region(WrState* aState,
+WrClipRegionToken wr_dp_push_clip_region(WrState *aState,
                                          WrRect aMain,
-                                         const WrComplexClipRegion* aComplex,
+                                         const WrComplexClipRegion *aComplex,
                                          size_t aComplexCount,
-                                         const WrImageMask* aImageMask)
+                                         const WrImageMask *aImageMask)
 WR_FUNC;
 
 WR_INLINE
-void wr_dp_push_iframe(WrState* aState,
+void wr_dp_push_iframe(WrState *aState,
                        WrRect aRect,
                        WrClipRegionToken aClip,
                        WrPipelineId aPipelineId)
 WR_FUNC;
 
 WR_INLINE
-void wr_dp_push_image(WrState* aState,
+void wr_dp_push_image(WrState *aState,
                       WrRect aBounds,
                       WrClipRegionToken aClip,
                       WrSize aStretchSize,
                       WrSize aTileSpacing,
                       WrImageRendering aImageRendering,
                       WrImageKey aKey)
 WR_FUNC;
 
 WR_INLINE
-void wr_dp_push_linear_gradient(WrState* aState,
+void wr_dp_push_linear_gradient(WrState *aState,
                                 WrRect aRect,
                                 WrClipRegionToken aClip,
                                 WrPoint aStartPoint,
                                 WrPoint aEndPoint,
-                                const WrGradientStop* aStops,
+                                const WrGradientStop *aStops,
                                 size_t aStopsCount,
                                 WrGradientExtendMode aExtendMode,
                                 WrSize aTileSize,
                                 WrSize aTileSpacing)
 WR_FUNC;
 
 WR_INLINE
-void wr_dp_push_radial_gradient(WrState* aState,
+void wr_dp_push_radial_gradient(WrState *aState,
                                 WrRect aRect,
                                 WrClipRegionToken aClip,
                                 WrPoint aCenter,
                                 WrSize aRadius,
-                                const WrGradientStop* aStops,
+                                const WrGradientStop *aStops,
                                 size_t aStopsCount,
                                 WrGradientExtendMode aExtendMode,
                                 WrSize aTileSize,
                                 WrSize aTileSpacing)
 WR_FUNC;
 
 WR_INLINE
-void wr_dp_push_rect(WrState* aState,
+void wr_dp_push_rect(WrState *aState,
                      WrRect aRect,
                      WrClipRegionToken aClip,
                      WrColor aColor)
 WR_FUNC;
 
 WR_INLINE
-void wr_dp_push_scroll_layer(WrState* aState,
+void wr_dp_push_scroll_layer(WrState *aState,
                              uint64_t aScrollId,
                              WrRect aContentRect,
                              WrRect aClipRect)
 WR_FUNC;
 
 WR_INLINE
-void wr_dp_push_stacking_context(WrState* aState,
+void wr_dp_push_stacking_context(WrState *aState,
                                  WrRect aBounds,
                                  uint64_t aAnimationId,
-                                 const float* aOpacity,
-                                 const WrMatrix* aTransform,
+                                 const float *aOpacity,
+                                 const WrMatrix *aTransform,
                                  WrMixBlendMode aMixBlendMode)
 WR_FUNC;
 
 WR_INLINE
-void wr_dp_push_text(WrState* aState,
+void wr_dp_push_text(WrState *aState,
                      WrRect aBounds,
                      WrClipRegionToken aClip,
                      WrColor aColor,
                      WrFontKey aFontKey,
-                     const WrGlyphInstance* aGlyphs,
+                     const WrGlyphInstance *aGlyphs,
                      uint32_t aGlyphCount,
                      float aGlyphSize)
 WR_FUNC;
 
 WR_INLINE
-void wr_dp_push_yuv_NV12_image(WrState* aState,
+void wr_dp_push_yuv_NV12_image(WrState *aState,
                                WrRect aBounds,
                                WrClipRegionToken aClip,
                                WrImageKey aImageKey0,
                                WrImageKey aImageKey1,
                                WrYuvColorSpace aColorSpace)
 WR_FUNC;
 
 WR_INLINE
-void wr_dp_push_yuv_interleaved_image(WrState* aState,
+void wr_dp_push_yuv_interleaved_image(WrState *aState,
                                       WrRect aBounds,
                                       WrClipRegionToken aClip,
                                       WrImageKey aImageKey0,
                                       WrYuvColorSpace aColorSpace)
 WR_FUNC;
 
 WR_INLINE
-void wr_dp_push_yuv_planar_image(WrState* aState,
+void wr_dp_push_yuv_planar_image(WrState *aState,
                                  WrRect aBounds,
                                  WrClipRegionToken aClip,
                                  WrImageKey aImageKey0,
                                  WrImageKey aImageKey1,
                                  WrImageKey aImageKey2,
                                  WrYuvColorSpace aColorSpace)
 WR_FUNC;
 
 WR_INLINE
-void wr_rendered_epochs_delete(WrRenderedEpochs* aPipelineEpochs)
+void wr_rendered_epochs_delete(WrRenderedEpochs *aPipelineEpochs)
 WR_DESTRUCTOR_SAFE_FUNC;
 
 WR_INLINE
-bool wr_rendered_epochs_next(WrRenderedEpochs* aPipelineEpochs,
-                             WrPipelineId* aOutPipeline,
-                             WrEpoch* aOutEpoch)
+bool wr_rendered_epochs_next(WrRenderedEpochs *aPipelineEpochs,
+                             WrPipelineId *aOutPipeline,
+                             WrEpoch *aOutEpoch)
 WR_FUNC;
 
 WR_INLINE
-bool wr_renderer_current_epoch(WrRenderer* aRenderer,
+bool wr_renderer_current_epoch(WrRenderer *aRenderer,
                                WrPipelineId aPipelineId,
-                               WrEpoch* aOutEpoch)
+                               WrEpoch *aOutEpoch)
 WR_FUNC;
 
 WR_INLINE
-void wr_renderer_delete(WrRenderer* aRenderer)
+void wr_renderer_delete(WrRenderer *aRenderer)
 WR_DESTRUCTOR_SAFE_FUNC;
 
 WR_INLINE
-WrRenderedEpochs* wr_renderer_flush_rendered_epochs(WrRenderer* aRenderer)
+WrRenderedEpochs* wr_renderer_flush_rendered_epochs(WrRenderer *aRenderer)
 WR_FUNC;
 
 WR_INLINE
-void wr_renderer_readback(WrRenderer* aRenderer,
+void wr_renderer_readback(WrRenderer *aRenderer,
                           uint32_t aWidth,
                           uint32_t aHeight,
-                          uint8_t* aDstBuffer,
+                          uint8_t *aDstBuffer,
                           size_t aBufferSize)
 WR_FUNC;
 
 WR_INLINE
-void wr_renderer_render(WrRenderer* aRenderer,
+void wr_renderer_render(WrRenderer *aRenderer,
                         uint32_t aWidth,
                         uint32_t aHeight)
 WR_FUNC;
 
 WR_INLINE
-void wr_renderer_set_external_image_handler(WrRenderer* aRenderer,
-                                            WrExternalImageHandler* aExternalImageHandler)
+void wr_renderer_set_external_image_handler(WrRenderer *aRenderer,
+                                            WrExternalImageHandler *aExternalImageHandler)
 WR_FUNC;
 
 WR_INLINE
-void wr_renderer_set_profiler_enabled(WrRenderer* aRenderer,
+void wr_renderer_set_profiler_enabled(WrRenderer *aRenderer,
                                       bool aEnabled)
 WR_FUNC;
 
 WR_INLINE
-void wr_renderer_update(WrRenderer* aRenderer)
+void wr_renderer_update(WrRenderer *aRenderer)
 WR_FUNC;
 
 WR_INLINE
-void wr_scroll_layer_with_id(WrAPI* aApi,
+void wr_scroll_layer_with_id(WrAPI *aApi,
                              WrPipelineId aPipelineId,
                              uint64_t aScrollId,
                              WrPoint aNewScrollOrigin)
 WR_FUNC;
 
 WR_INLINE
-void wr_state_delete(WrState* aState)
+void wr_state_delete(WrState *aState)
 WR_DESTRUCTOR_SAFE_FUNC;
 
 WR_INLINE
 WrState* wr_state_new(WrPipelineId aPipelineId,
                       WrSize aContentSize)
 WR_FUNC;
 
 WR_INLINE
 void wr_vec_u8_free(WrVecU8 aV)
 WR_FUNC;
 
 WR_INLINE
 bool wr_window_new(WrWindowId aWindowId,
                    uint32_t aWindowWidth,
                    uint32_t aWindowHeight,
-                   void* aGlContext,
+                   void *aGlContext,
                    bool aEnableProfiler,
-                   WrAPI** aOutApi,
-                   WrRenderer** aOutRenderer)
+                   WrAPI **aOutApi,
+                   WrRenderer **aOutRenderer)
 WR_FUNC;
 
 } // extern "C"
 
 /* DO NOT MODIFY THIS MANUALLY! This file was generated using cbindgen.
  * To generate this file, clone `https://github.com/rlhunt/cbindgen` or run `cargo install cbindgen`,
  * then run `cbindgen gfx/webrender_bindings/ -o gfx/webrender_bindings/webrender_ffi_generated.h` */