Bug 970096 - Try a 16 bit OpenGL context as a last result on Android. r=bjacob, a=sledru
authorJames Willcox <snorp@snorp.net>
Mon, 24 Feb 2014 16:17:34 -0600
changeset 176386 3d2e069fb893ad0f718c9a2e37f9135fd75c168a
parent 176385 3d19db329bdd7166094992197047eff48f6291f3
child 176387 6bc693b11af08196a3826bc5821075c7537f3614
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbjacob, sledru
bugs970096
milestone28.0
Bug 970096 - Try a 16 bit OpenGL context as a last result on Android. r=bjacob, a=sledru
gfx/gl/GLContextProviderEGL.cpp
--- a/gfx/gl/GLContextProviderEGL.cpp
+++ b/gfx/gl/GLContextProviderEGL.cpp
@@ -738,16 +738,21 @@ CreateConfig(EGLConfig* aConfig)
     int32_t depth = gfxPlatform::GetPlatform()->GetScreenDepth();
     if (!CreateConfig(aConfig, depth)) {
 #ifdef MOZ_WIDGET_ANDROID
         // Bug 736005
         // Android doesn't always support 16 bit so also try 24 bit
         if (depth == 16) {
             return CreateConfig(aConfig, 24);
         }
+        // Bug 970096
+        // Some devices that have 24 bit screens only support 16 bit OpenGL?
+        if (depth == 24) {
+            return CreateConfig(aConfig, 16);
+        }
 #endif
         return false;
     } else {
         return true;
     }
 }
 
 already_AddRefed<GLContext>