Bug 989027 - 2/2 - Make LayerRenderStateFlags a typed enum, auto regex changes - r=nical
authorBenoit Jacob <bjacob@mozilla.com>
Fri, 25 Apr 2014 22:34:05 -0400
changeset 180553 15202a4be01eb244c4da0852c676980deef31979
parent 180552 69a7d46f0174a8bd28cab68ddb2f212c115a03d6
child 180554 2ff75b7686457ea8332d19d02516e5e17d48cf1f
push id26674
push userkwierso@gmail.com
push dateMon, 28 Apr 2014 22:57:38 +0000
treeherdermozilla-central@b681a6daea3b [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();