diff options
Diffstat (limited to 'gpu/src')
-rw-r--r-- | gpu/src/GrGpuGL.cpp | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/gpu/src/GrGpuGL.cpp b/gpu/src/GrGpuGL.cpp index 084f98fd4a..2951895df8 100644 --- a/gpu/src/GrGpuGL.cpp +++ b/gpu/src/GrGpuGL.cpp @@ -551,17 +551,17 @@ GrRenderTarget* GrGpuGL::createRenderTargetFrom3DApiState() { } // defines stencil formats from more to less preferred -GLenum GR_GL_STENCIL_FORMAT_ARRAY[] = {
- GR_STENCIL_INDEX8,
-
-#if GR_SUPPORT_GLDESKTOP
- GR_STENCIL_INDEX16,
-#endif
-
- GR_DEPTH24_STENCIL8,
- GR_STENCIL_INDEX4,
-
-#if GR_SUPPORT_GLDESKTOP
+GLenum GR_GL_STENCIL_FORMAT_ARRAY[] = { + GR_STENCIL_INDEX8, + +#if GR_SUPPORT_GLDESKTOP + GR_STENCIL_INDEX16, +#endif + + GR_DEPTH24_STENCIL8, + GR_STENCIL_INDEX4, + +#if GR_SUPPORT_GLDESKTOP GL_STENCIL_INDEX, GR_DEPTH_STENCIL, #endif @@ -1672,12 +1672,12 @@ bool GrGpuGL::canBeTexture(GrTexture::PixelConfig config, case GrTexture::kRGBA_8888_PixelConfig: case GrTexture::kRGBX_8888_PixelConfig: // todo: can we tell it our X? *format = GR_GL_32BPP_COLOR_FORMAT; -#if GR_SUPPORT_GLES
- // according to GL_EXT_texture_format_BGRA8888 the *internal*
- // format for a BGRA is BGRA not RGBA (as on desktop)
- *internalFormat = GR_GL_32BPP_COLOR_FORMAT;
-#else
- *internalFormat = GL_RGBA;
+#if GR_SUPPORT_GLES + // according to GL_EXT_texture_format_BGRA8888 the *internal* + // format for a BGRA is BGRA not RGBA (as on desktop) + *internalFormat = GR_GL_32BPP_COLOR_FORMAT; +#else + *internalFormat = GL_RGBA; #endif *type = GL_UNSIGNED_BYTE; break; @@ -1777,7 +1777,9 @@ void GrGLCheckErr(const char* location, const char* call) { typedef void (*glProc)(void); void get_gl_proc(const char procName[], glProc *address) { -#if GR_WIN32_BUILD +#if GR_CHROME_BUILD + GrAssert(!"should not get called"); +#elif GR_WIN32_BUILD *address = (glProc)wglGetProcAddress(procName); GrAssert(NULL != *address); #elif GR_MAC_BUILD || GR_IOS_BUILD @@ -1946,3 +1948,4 @@ extern void GrGLInitExtensions(GrGLExts* exts) { bool gPrintGL = true; + |