Bug 1340997 - rename the external image related structure in webrender_ffi. r=sotaro
authorJerryShih <hshih@mozilla.com>
Wed, 01 Mar 2017 17:08:56 +0800
changeset 394766 169c2f5176bbc98d0ee8d2158f78a1a0d9cbf3c7
parent 394765 f717cae2844ff028396e14dfac25baa7d5f4f354
child 394767 e306b40ff823a65433b153cd0ab85f720ab05e02
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssotaro
bugs1340997
milestone54.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 1340997 - rename the external image related structure in webrender_ffi. r=sotaro The name of "WrExternalImageIdId" is a little bit strange. MozReview-Commit-ID: 8pfWxg5XuYS
gfx/webrender_bindings/webrender_ffi.h
--- a/gfx/webrender_bindings/webrender_ffi.h
+++ b/gfx/webrender_bindings/webrender_ffi.h
@@ -294,45 +294,45 @@ struct WrImageMask
   bool repeat;
 
   bool operator==(const WrImageMask& aRhs) const
   {
     return image == aRhs.image && rect == aRhs.rect && repeat == aRhs.repeat;
   }
 };
 
-struct WrExternalImageIdId
+struct WrExternalImageId
 {
   WrImageIdType id;
 };
 
-struct WrExternalImageId
+struct WrExternalImage
 {
   WrExternalImageIdType type;
 
   // Texture coordinate
   float u0, v0;
   float u1, v1;
 
   // external buffer handle
   uint32_t handle;
 
   // TODO(Jerry): handle shmem or cpu raw buffers.
   //// shmem or memory buffer
   //// uint8_t* buff;
   //// size_t size;
 };
 
-typedef WrExternalImageId (*LockExternalImageCallback)(void*, WrExternalImageIdId);
-typedef void (*UnlockExternalImageCallback)(void*, WrExternalImageIdId);
-typedef void (*ReleaseExternalImageCallback)(void*, WrExternalImageIdId);
+typedef WrExternalImage (*LockExternalImageCallback)(void*, WrExternalImageId);
+typedef void (*UnlockExternalImageCallback)(void*, WrExternalImageId);
+typedef void (*ReleaseExternalImageCallback)(void*, WrExternalImageId);
 
-struct WrExternalImageIdHandler
+struct WrExternalImageHandler
 {
-  void* ExternalImageObj;
+  void* renderer_obj;
   LockExternalImageCallback lock_func;
   UnlockExternalImageCallback unlock_func;
   ReleaseExternalImageCallback release_func;
 };
 
 struct WrImageDescriptor {
     WrImageFormat format;
     uint32_t width;
@@ -399,17 +399,17 @@ wr_rendered_epochs_next(WrRenderedEpochs
 
 WR_INLINE void
 wr_rendered_epochs_delete(WrRenderedEpochs* pipeline_epochs) WR_DESTRUCTOR_SAFE_FUNC;
 
 WR_INLINE bool
 wr_window_new(WrWindowId window_id,
               void* aGLContext,
               bool enable_profiler,
-              WrExternalImageIdHandler* handler,
+              WrExternalImageHandler* handler,
               WrAPI** out_api,
               WrRenderer** out_renderer)
 WR_FUNC;
 
 WR_INLINE void
 wr_api_delete(WrAPI* api)
 WR_DESTRUCTOR_SAFE_FUNC;