Bug 989027 - 2/2 - Make LayerRenderStateFlags a typed enum, auto regex changes - r=nical
☠☠ backed out by 0ecc4193e630 ☠ ☠
authorBenoit Jacob <bjacob@mozilla.com>
Fri, 25 Apr 2014 22:34:05 -0400
changeset 180319 27f338fbc835acced577668d60b4831738f27d9f
parent 180318 4a67f5144ea432a299a7d6f2024065601c5a9707
child 180320 dcc0d016de7ab6860a97083edfff77cba8b99564
push id42737
push userbjacob@mozilla.com
push dateSat, 26 Apr 2014 02:34:56 +0000
treeherdermozilla-inbound@610d7ccaaa9c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs989027
milestone31.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 989027 - 2/2 - Make LayerRenderStateFlags a typed enum, auto regex changes - r=nical find gfx -type f | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)LAYER_RENDER_STATE_\(Y_FLIPPED\|BUFFER_ROTATION\|FORMAT_RB_SWAP\)\($\|[^A-Za-z0-9_]\)/\1LayerRenderStateFlags::\2\3/g'
gfx/layers/composite/ContentHost.cpp
gfx/layers/opengl/GrallocTextureHost.cpp
--- a/gfx/layers/composite/ContentHost.cpp
+++ b/gfx/layers/composite/ContentHost.cpp
@@ -680,17 +680,17 @@ ContentHostTexture::GetRenderState()
 {
   if (!mTextureHost) {
     return LayerRenderState();
   }
 
   LayerRenderState result = mTextureHost->GetRenderState();
 
   if (mBufferRotation != nsIntPoint()) {
-    result.mFlags |= LAYER_RENDER_STATE_BUFFER_ROTATION;
+    result.mFlags |= LayerRenderStateFlags::BUFFER_ROTATION;
   }
   result.SetOffset(GetOriginOffset());
   return result;
 }
 
 #ifdef MOZ_DUMP_PAINTING
 TemporaryRef<gfx::DataSourceSurface>
 ContentHostTexture::GetAsSurface()
--- a/gfx/layers/opengl/GrallocTextureHost.cpp
+++ b/gfx/layers/opengl/GrallocTextureHost.cpp
@@ -367,20 +367,20 @@ GrallocTextureHostOGL::DeallocateDeviceD
 }
 
 LayerRenderState
 GrallocTextureHostOGL::GetRenderState()
 {
   if (IsValid()) {
     LayerRenderStateFlags flags = LayerRenderStateFlags::LAYER_RENDER_STATE_DEFAULT;
     if (mFlags & TextureFlags::NEEDS_Y_FLIP) {
-      flags |= LAYER_RENDER_STATE_Y_FLIPPED;
+      flags |= LayerRenderStateFlags::Y_FLIPPED;
     }
     if (mFlags & TextureFlags::RB_SWAPPED) {
-      flags |= LAYER_RENDER_STATE_FORMAT_RB_SWAP;
+      flags |= LayerRenderStateFlags::FORMAT_RB_SWAP;
     }
     return LayerRenderState(mTextureSource->mGraphicBuffer.get(),
                             gfx::ThebesIntSize(mSize),
                             flags,
                             this);
   }
 
   return LayerRenderState();