Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Unified Diff: src/gpu/gl/GrGLGpu.cpp

Issue 1332853003: Fix texture creation on stencil format test code (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLGpu.cpp
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index 0eac373f2e81f1edf8a8ba975e4a937cebe88273..f27ff019b44cec9e14f92b975e236016dc9efc61 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -1206,7 +1206,14 @@ int GrGLGpu::getCompatibleStencilIndex(GrPixelConfig config) {
GrGLenum internalFormat = 0x0; // suppress warning
GrGLenum externalFormat = 0x0; // suppress warning
GrGLenum externalType = 0x0; // suppress warning
- if (!this->configToGLFormats(config, false, &internalFormat,
+ bool useSizedFormat = false;
+ if (kGL_GrGLStandard == this->glStandard() ||
+ (this->glVersion() >= GR_GL_VER(3, 0) &&
+ // ES3 only works with sized BGRA8 format if "GL_APPLE_texture_format_BGRA8888" enabled
+ (kBGRA_8888_GrPixelConfig != config || !this->glCaps().bgraIsInternalFormat()))) {
+ useSizedFormat = true;
+ }
+ if (!this->configToGLFormats(config, useSizedFormat, &internalFormat,
&externalFormat, &externalType)) {
GL_CALL(DeleteTextures(1, &colorID));
fPixelConfigToStencilIndex[config] = kUnsupportedStencilIndex;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698