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

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

Issue 1152563003: Further work on sRGB support. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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 | « src/gpu/gl/GrGLDefines.h ('k') | 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 6a8d83b019fdd4d060b8773ad4ffcdd60fc2d5a8..a4e39d65a0ac287094ce51cd930cb0d5aff6619e 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -2384,10 +2384,17 @@ bool GrGLGpu::configToGLFormats(GrPixelConfig config,
case kSRGBA_8888_GrPixelConfig:
*internalFormat = GR_GL_SRGB_ALPHA;
*externalFormat = GR_GL_SRGB_ALPHA;
- if (getSizedInternalFormat) {
+ if (getSizedInternalFormat || kGL_GrGLStandard == this->glStandard()) {
+ // desktop or ES 3.0
+ SkASSERT(this->glVersion() >= GR_GL_VER(3, 0));
*internalFormat = GR_GL_SRGB8_ALPHA8;
+ *externalFormat = GR_GL_RGBA;
} else {
+ // ES 2.0 with EXT_sRGB
+ SkASSERT(kGL_GrGLStandard != this->glStandard() &&
+ this->glVersion() < GR_GL_VER(3, 0));
*internalFormat = GR_GL_SRGB_ALPHA;
+ *externalFormat = GR_GL_SRGB_ALPHA;
}
*externalType = GR_GL_UNSIGNED_BYTE;
break;
« no previous file with comments | « src/gpu/gl/GrGLDefines.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698