Backed out changeset e9a7aaad1771 (bug 958420) for causing merge conflicts from m-c
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Mon, 13 Jan 2014 14:41:31 +0100
changeset 163128 8c99b82a36e640e68eab68c99d65e6a4a953bf79
parent 163127 0445456b397c1ac4f675e682800c8bb880892e9e
child 163129 6af4c495a33fbf10a293d03e7314674756d70a07
push id25982
push userryanvm@gmail.com
push dateMon, 13 Jan 2014 22:30:39 +0000
treeherdermozilla-central@d524c4b2cbb8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs958420
milestone29.0a1
backs oute9a7aaad1771e987f2b78eef42009256f103c0d7
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
Backed out changeset e9a7aaad1771 (bug 958420) for causing merge conflicts from m-c
gfx/layers/ipc/ShadowLayerUtilsGralloc.cpp
gfx/layers/opengl/GrallocTextureClient.cpp
gfx/layers/opengl/GrallocTextureHost.cpp
gfx/layers/opengl/TextureHostOGL.cpp
--- a/gfx/layers/ipc/ShadowLayerUtilsGralloc.cpp
+++ b/gfx/layers/ipc/ShadowLayerUtilsGralloc.cpp
@@ -151,32 +151,36 @@ ImageFormatForPixelFormat(android::Pixel
 {
   switch (aFormat) {
   case PIXEL_FORMAT_RGBA_8888:
     return gfxImageFormatARGB32;
   case PIXEL_FORMAT_RGBX_8888:
     return gfxImageFormatRGB24;
   case PIXEL_FORMAT_RGB_565:
     return gfxImageFormatRGB16_565;
+  case PIXEL_FORMAT_A_8:
+    return gfxImageFormatA8;
   default:
     MOZ_CRASH("Unknown gralloc pixel format");
   }
   return gfxImageFormatARGB32;
 }
 
 static android::PixelFormat
 PixelFormatForImageFormat(gfxImageFormat aFormat)
 {
   switch (aFormat) {
   case gfxImageFormatARGB32:
     return android::PIXEL_FORMAT_RGBA_8888;
   case gfxImageFormatRGB24:
     return android::PIXEL_FORMAT_RGBX_8888;
   case gfxImageFormatRGB16_565:
     return android::PIXEL_FORMAT_RGB_565;
+  case gfxImageFormatA8:
+    return android::PIXEL_FORMAT_A_8;
   default:
     MOZ_CRASH("Unknown gralloc pixel format");
   }
   return gfxImageFormatARGB32;
 }
 
 static size_t
 BytesPerPixelForPixelFormat(android::PixelFormat aFormat)
@@ -187,16 +191,18 @@ BytesPerPixelForPixelFormat(android::Pix
   case PIXEL_FORMAT_BGRA_8888:
     return 4;
   case PIXEL_FORMAT_RGB_888:
     return 3;
   case PIXEL_FORMAT_RGB_565:
   case PIXEL_FORMAT_RGBA_5551:
   case PIXEL_FORMAT_RGBA_4444:
     return 2;
+  case PIXEL_FORMAT_A_8:
+    return 1;
   default:
     return 0;
   }
   return 0;
 }
 
 static android::PixelFormat
 PixelFormatForContentType(gfxContentType aContentType)
--- a/gfx/layers/opengl/GrallocTextureClient.cpp
+++ b/gfx/layers/opengl/GrallocTextureClient.cpp
@@ -224,16 +224,19 @@ GrallocTextureClientOGL::AllocateForSurf
   case gfx::FORMAT_R8G8B8X8:
   case gfx::FORMAT_B8G8R8X8:
     // there is no android BGRX format?
     format = android::PIXEL_FORMAT_RGBX_8888;
     break;
   case gfx::FORMAT_R5G6B5:
     format = android::PIXEL_FORMAT_RGB_565;
     break;
+  case gfx::FORMAT_A8:
+    format = android::PIXEL_FORMAT_A_8;
+    break;
   default:
     NS_WARNING("Unsupported surface format");
     return false;
   }
 
   return AllocateGralloc(aSize, format, usage);
 }
 
--- a/gfx/layers/opengl/GrallocTextureHost.cpp
+++ b/gfx/layers/opengl/GrallocTextureHost.cpp
@@ -26,16 +26,18 @@ SurfaceFormatForAndroidPixelFormat(andro
   case android::PIXEL_FORMAT_BGRA_8888:
     return swapRB ? gfx::FORMAT_R8G8B8A8 : gfx::FORMAT_B8G8R8A8;
   case android::PIXEL_FORMAT_RGBA_8888:
     return swapRB ? gfx::FORMAT_B8G8R8A8 : gfx::FORMAT_R8G8B8A8;
   case android::PIXEL_FORMAT_RGBX_8888:
     return swapRB ? gfx::FORMAT_B8G8R8X8 : gfx::FORMAT_R8G8B8X8;
   case android::PIXEL_FORMAT_RGB_565:
     return gfx::FORMAT_R5G6B5;
+  case android::PIXEL_FORMAT_A_8:
+    return gfx::FORMAT_A8;
   case HAL_PIXEL_FORMAT_YCbCr_422_SP:
   case HAL_PIXEL_FORMAT_YCrCb_420_SP:
   case HAL_PIXEL_FORMAT_YCbCr_422_I:
   case GrallocImage::HAL_PIXEL_FORMAT_YCbCr_420_SP_TILED:
   case GrallocImage::HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS:
   case HAL_PIXEL_FORMAT_YV12:
     return gfx::FORMAT_B8G8R8A8; // yup, use FORMAT_B8G8R8A8 even though it's a YUV texture. This is an external texture.
   default:
@@ -64,16 +66,17 @@ TextureTargetForAndroidPixelFormat(andro
   case HAL_PIXEL_FORMAT_YCbCr_422_I:
   case GrallocImage::HAL_PIXEL_FORMAT_YCbCr_420_SP_TILED:
   case GrallocImage::HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS:
   case HAL_PIXEL_FORMAT_YV12:
     return LOCAL_GL_TEXTURE_EXTERNAL;
   case android::PIXEL_FORMAT_RGBA_8888:
   case android::PIXEL_FORMAT_RGBX_8888:
   case android::PIXEL_FORMAT_RGB_565:
+  case android::PIXEL_FORMAT_A_8:
     return LOCAL_GL_TEXTURE_2D;
   default:
     if (aFormat >= 0x100 && aFormat <= 0x1FF) {
       // Reserved range for HAL specific formats.
       return LOCAL_GL_TEXTURE_EXTERNAL;
     } else {
       // This is not super-unreachable, there's a bunch of hypothetical pixel
       // formats we don't deal with.
--- a/gfx/layers/opengl/TextureHostOGL.cpp
+++ b/gfx/layers/opengl/TextureHostOGL.cpp
@@ -1257,16 +1257,18 @@ Deprecated_SurfaceFormatForAndroidPixelF
   case android::PIXEL_FORMAT_BGRA_8888:
     return swapRB ? FORMAT_R8G8B8A8 : FORMAT_B8G8R8A8;
   case android::PIXEL_FORMAT_RGBA_8888:
     return swapRB ? FORMAT_B8G8R8A8 : FORMAT_R8G8B8A8;
   case android::PIXEL_FORMAT_RGBX_8888:
     return swapRB ? FORMAT_B8G8R8X8 : FORMAT_R8G8B8X8;
   case android::PIXEL_FORMAT_RGB_565:
     return FORMAT_R5G6B5;
+  case android::PIXEL_FORMAT_A_8:
+    return FORMAT_A8;
   case HAL_PIXEL_FORMAT_YCbCr_422_SP:
   case HAL_PIXEL_FORMAT_YCrCb_420_SP:
   case HAL_PIXEL_FORMAT_YCbCr_422_I:
   case GrallocImage::HAL_PIXEL_FORMAT_YCbCr_420_SP_TILED:
   case GrallocImage::HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS:
   case HAL_PIXEL_FORMAT_YV12:
     return FORMAT_B8G8R8A8; // yup, use FORMAT_B8G8R8A8 even though it's a YUV texture. This is an external texture.
   default:
@@ -1294,16 +1296,17 @@ Deprecated_TextureTargetForAndroidPixelF
   case HAL_PIXEL_FORMAT_YCbCr_422_I:
   case GrallocImage::HAL_PIXEL_FORMAT_YCbCr_420_SP_TILED:
   case GrallocImage::HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS:
   case HAL_PIXEL_FORMAT_YV12:
     return LOCAL_GL_TEXTURE_EXTERNAL;
   case android::PIXEL_FORMAT_RGBA_8888:
   case android::PIXEL_FORMAT_RGBX_8888:
   case android::PIXEL_FORMAT_RGB_565:
+  case android::PIXEL_FORMAT_A_8:
     return LOCAL_GL_TEXTURE_2D;
   default:
     if (aFormat >= 0x100 && aFormat <= 0x1FF) {
       // Reserved range for HAL specific formats.
       return LOCAL_GL_TEXTURE_EXTERNAL;
     } else {
       // This is not super-unreachable, there's a bunch of hypothetical pixel
       // formats we don't deal with.