diff options
author | 2017-01-19 15:52:24 -0500 | |
---|---|---|
committer | 2017-01-19 21:58:06 +0000 | |
commit | 0ee6f95fa479a15972c0153328d2456f70e0fb33 (patch) | |
tree | a4eb78f5d8221b505a3b13907273d1352a306de0 /src/gpu | |
parent | 1790f8ea097c40489f18857685eca4afa02badd8 (diff) |
Make GL_RED workaround only be triggered by osmesa
BUG=skia:6134
Change-Id: If9c8fb55973815d378cd8a9d956735656d4c097c
Reviewed-on: https://skia-review.googlesource.com/7276
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/gl/GrGLCaps.cpp | 4 | ||||
-rw-r--r-- | src/gpu/gl/GrGLUtil.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index 7a11cf8483..cd3f478b8a 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -120,9 +120,9 @@ void GrGLCaps::init(const GrContextOptions& contextOptions, fSampleLocationsSupport = version >= GR_GL_VER(3,1); } - // ARB_texture_rg is part of OpenGL 3.0, but mesa doesn't support GL_RED + // ARB_texture_rg is part of OpenGL 3.0, but osmesa doesn't support GL_RED // and GL_RG on FBO textures. - if (kMesa_GrGLDriver != ctxInfo.driver()) { + if (kOSMesa_GrGLRenderer != ctxInfo.renderer()) { if (kGL_GrGLStandard == standard) { fTextureRedSupport = version >= GR_GL_VER(3,0) || ctxInfo.hasExtension("GL_ARB_texture_rg"); diff --git a/src/gpu/gl/GrGLUtil.cpp b/src/gpu/gl/GrGLUtil.cpp index 23544fee9a..6d8337ecfd 100644 --- a/src/gpu/gl/GrGLUtil.cpp +++ b/src/gpu/gl/GrGLUtil.cpp @@ -309,7 +309,7 @@ GrGLRenderer GrGLGetRendererFromString(const char* rendererString) { } } } - if (strcmp("Mesa Offscreen", rendererString)) { + if (0 == strcmp("Mesa Offscreen", rendererString)) { return kOSMesa_GrGLRenderer; } } |