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

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

Issue 791823003: Add sRGB texture support. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add in changes for copy_to_new_texture_pixelref Created 6 years 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
« include/core/SkPixelRef.h ('K') | « 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/GrGpuGL.cpp
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index 5987c7000f6e7a216d3f09afee549830da463a89..e2fc6927e8d5b092d55be5f3ea88105e203843cd 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -2306,6 +2306,16 @@ bool GrGLGpu::configToGLFormats(GrPixelConfig config,
*externalFormat = GR_GL_BGRA;
*externalType = GR_GL_UNSIGNED_BYTE;
break;
+ case kSRGBA_8888_GrPixelConfig:
+ *internalFormat = GR_GL_SRGB_ALPHA;
+ *externalFormat = GR_GL_SRGB_ALPHA;
+ if (getSizedInternalFormat) {
+ *internalFormat = GR_GL_SRGB8_ALPHA8;
+ } else {
+ *internalFormat = GR_GL_SRGB_ALPHA;
+ }
+ *externalType = GR_GL_UNSIGNED_BYTE;
+ break;
case kRGB_565_GrPixelConfig:
*internalFormat = GR_GL_RGB;
*externalFormat = GR_GL_RGB;
« include/core/SkPixelRef.h ('K') | « src/gpu/gl/GrGLDefines.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698