Bug 880268 - Handle default pixel format in BytesPerPixelForPixelFormat(). r=vlad
authorSotaro Ikeda <sikeda@mozilla.com>
Fri, 07 Jun 2013 12:05:03 -0400
changeset 145858 952393b787bf236f0ed88f34af47f6d2805dd578
parent 145857 8e7a612cc23214d4881c28c19e69fe347ccb6827
child 145859 4f30d257a8fa19a43b7d76a33d4fd4a555850153
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvlad
bugs880268
milestone24.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 880268 - Handle default pixel format in BytesPerPixelForPixelFormat(). r=vlad
gfx/layers/ipc/ShadowLayerUtilsGralloc.cpp
--- a/gfx/layers/ipc/ShadowLayerUtilsGralloc.cpp
+++ b/gfx/layers/ipc/ShadowLayerUtilsGralloc.cpp
@@ -158,19 +158,19 @@ BytesPerPixelForPixelFormat(android::Pix
     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:
-    MOZ_NOT_REACHED("Unknown gralloc pixel format");
+    return 0;
   }
-  return gfxASurface::ImageFormatARGB32;
+  return 0;
 }
 
 static android::PixelFormat
 PixelFormatForContentType(gfxASurface::gfxContentType aContentType)
 {
   return PixelFormatForImageFormat(
     gfxPlatform::GetPlatform()->OptimalFormatForContent(aContentType));
 }