Bug 1343984 - Comment out the unused WrExternalImageIdType stuff as it produces hard-to-remove webrender_bindings warnings. r=jrmuizel
authorKartikaya Gupta <kgupta@mozilla.com>
Thu, 02 Mar 2017 16:26:17 -0500
changeset 374825 ead89e056556d060d54decf3a996ffa0fe040358
parent 374824 80ea84e1b5023141db7087fa08badb8c17307242
child 374826 c83b1eec0a124f2322d6166f9ac10ca9e1d39952
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1343984
milestone54.0a1
Bug 1343984 - Comment out the unused WrExternalImageIdType stuff as it produces hard-to-remove webrender_bindings warnings. r=jrmuizel MozReview-Commit-ID: 3CGCGPAVBNn
gfx/webrender_bindings/RendererOGL.cpp
gfx/webrender_bindings/src/bindings.rs
gfx/webrender_bindings/webrender_ffi.h
--- a/gfx/webrender_bindings/RendererOGL.cpp
+++ b/gfx/webrender_bindings/RendererOGL.cpp
@@ -11,17 +11,17 @@
 #include "mozilla/layers/CompositorThread.h"
 #include "mozilla/widget/CompositorWidget.h"
 
 namespace mozilla {
 namespace wr {
 
 WrExternalImage LockExternalImage(void* aObj, WrExternalImageId aId)
 {
-  return WrExternalImage { WrExternalImageIdType::TEXTURE_HANDLE, 0.0f, 0.0f, 0.0f, 0.0f, 0 };
+  return WrExternalImage { /*WrExternalImageIdType::TextureHandle, */0.0f, 0.0f, 0.0f, 0.0f, 0 };
 }
 
 void UnlockExternalImage(void* aObj, WrExternalImageId aId)
 {
 }
 
 void ReleaseExternalImage(void* aObj, WrExternalImageId aId)
 {
--- a/gfx/webrender_bindings/src/bindings.rs
+++ b/gfx/webrender_bindings/src/bindings.rs
@@ -441,27 +441,26 @@ impl WebRenderFrameBuilder {
 }
 
 pub struct WrState {
     pipeline_id: PipelineId,
     z_index: i32,
     frame_builder: WebRenderFrameBuilder,
 }
 
-#[repr(C)]
-enum WrExternalImageType {
-    TEXTURE_HANDLE,
-
-    // TODO(Jerry): handle shmem or cpu raw buffers.
-    //// MEM_OR_SHMEM,
-}
+// TODO(Jerry): handle shmem or cpu raw buffers.
+//#[repr(C)]
+//enum WrExternalImageType {
+//    TextureHandle,
+//    MemOrShmem,
+//}
 
 #[repr(C)]
 struct WrExternalImageStruct {
-    image_type: WrExternalImageType,
+    //image_type: WrExternalImageType,
 
     // Texture coordinate
     u0: f32,
     v0: f32,
     u1: f32,
     v1: f32,
 
     // external buffer handle
@@ -483,26 +482,27 @@ pub struct WrExternalImageHandler {
     unlock_func: UnlockExternalImageCallback,
     release_func: ReleaseExternalImageCallback,
 }
 
 impl ExternalImageHandler for WrExternalImageHandler {
     fn lock(&mut self, id: ExternalImageId) -> ExternalImage {
         let image = (self.lock_func)(self.external_image_obj, id);
 
-        match image.image_type {
-            WrExternalImageType::TEXTURE_HANDLE =>
+        // TODO(Jerry): handle shmem or cpu raw buffers.
+        //match image.image_type {
+        //    WrExternalImageType::TextureHandle =>
                 ExternalImage {
                     u0: image.u0,
                     v0: image.v0,
                     u1: image.u1,
                     v1: image.v1,
                     source: ExternalImageSource::NativeTexture(image.handle)
-                },
-        }
+                }
+        //}
     }
 
     fn unlock(&mut self, id: ExternalImageId) {
         (self.unlock_func)(self.external_image_obj, id);
     }
 
     fn release(&mut self, id: ExternalImageId) {
         (self.release_func)(self.external_image_obj, id);
--- a/gfx/webrender_bindings/webrender_ffi.h
+++ b/gfx/webrender_bindings/webrender_ffi.h
@@ -110,22 +110,24 @@ enum class WrImageRendering: uint32_t
 {
   Auto        = 0,
   CrispEdges  = 1,
   Pixelated   = 2,
 
   Sentinel /* this must be last, for IPC serialization purposes */
 };
 
-enum class WrExternalImageIdType
-{
-  TEXTURE_HANDLE, // Currently, we only support gl texture handle.
-  // TODO(Jerry): handle shmem or cpu raw buffers.
-  //// MEM_OR_SHMEM,
-};
+// TODO(Jerry): handle shmem or cpu raw buffers.
+//enum class WrExternalImageIdType: uint32_t
+//{
+//  TextureHandle = 0,
+//  MemOrShmem    = 1,
+//
+//  Sentinel /* this must be last, for IPC serialization purposes */
+//};
 
 enum class WrMixBlendMode: uint32_t
 {
   Normal      = 0,
   Multiply    = 1,
   Screen      = 2,
   Overlay     = 3,
   Darken      = 4,
@@ -302,17 +304,17 @@ struct WrImageMask
 
 struct WrExternalImageId
 {
   WrImageIdType id;
 };
 
 struct WrExternalImage
 {
-  WrExternalImageIdType type;
+  //WrExternalImageIdType type;
 
   // Texture coordinate
   float u0, v0;
   float u1, v1;
 
   // external buffer handle
   uint32_t handle;