From 63100f9e36430ae03bba309825f35040cbfa0741 Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Tue, 18 Jan 2011 21:32:14 +0000 Subject: add GR_BUILD_CHROME for now. hopefully we can replace it with other, non-chrome-specific refactoring to accomodate those differences. git-svn-id: http://skia.googlecode.com/svn/trunk@708 2bbb7eff-a529-9590-31e7-b0007b416f81 --- gpu/src/GrGpuGL.cpp | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) (limited to 'gpu/src') 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; + -- cgit v1.2.3