Bug 1289005 - Handle GL_BGRA_EXT in GetBytesPerTexel; r=snorp
authorJamie Nicol <jnicol@mozilla.com>
Mon, 25 Jul 2016 14:24:34 +0100
changeset 346726 5af04e12e8600cab5109eeb66c6061c5ad901526
parent 346725 5db66203614e7591bf7bfb2de3f802f144ae139c
child 346727 784f2a4f0d225a6d945b2309dd479d7ae2d30527
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs1289005
milestone50.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 1289005 - Handle GL_BGRA_EXT in GetBytesPerTexel; r=snorp Also, do not MOZ_CRASH for unknown types and formats. The gfxCriticalError will assert in debug builds and provide the values of unknown types or formats. MozReview-Commit-ID: 46sWBdOdqiE
gfx/gl/GLContext.cpp
--- a/gfx/gl/GLContext.cpp
+++ b/gfx/gl/GLContext.cpp
@@ -3062,26 +3062,26 @@ GetBytesPerTexel(GLenum format, GLenum t
             case LOCAL_GL_ALPHA:
             case LOCAL_GL_LUMINANCE:
                 return 1 * multiplier;
             case LOCAL_GL_LUMINANCE_ALPHA:
                 return 2 * multiplier;
             case LOCAL_GL_RGB:
                 return 3 * multiplier;
             case LOCAL_GL_RGBA:
+            case LOCAL_GL_BGRA_EXT:
                 return 4 * multiplier;
             default:
                 break;
         }
     } else if (type == LOCAL_GL_UNSIGNED_SHORT_4_4_4_4 ||
                type == LOCAL_GL_UNSIGNED_SHORT_5_5_5_1 ||
                type == LOCAL_GL_UNSIGNED_SHORT_5_6_5)
     {
         return 2;
     }
 
     gfxCriticalError() << "Unknown texture type " << type << " or format " << format;
-    MOZ_CRASH();
     return 0;
 }
 
 } /* namespace gl */
 } /* namespace mozilla */