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

Unified Diff: include/gpu/GrTypes.h

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
Index: include/gpu/GrTypes.h
diff --git a/include/gpu/GrTypes.h b/include/gpu/GrTypes.h
index 4e225f0cb997f43738aa5a38e6100f6201ce75d5..6ce4f527f25810a3521979944b23c696d5870e00 100644
--- a/include/gpu/GrTypes.h
+++ b/include/gpu/GrTypes.h
@@ -271,6 +271,10 @@ enum GrPixelConfig {
*/
kBGRA_8888_GrPixelConfig,
/**
+ * Premultiplied and sRGB. Byte order is r,g,b,a.
+ */
+ kSRGBA_8888_GrPixelConfig,
+ /**
* ETC1 Compressed Data
*/
kETC1_GrPixelConfig,
@@ -342,6 +346,7 @@ static inline bool GrPixelConfigIs8888(GrPixelConfig config) {
switch (config) {
case kRGBA_8888_GrPixelConfig:
case kBGRA_8888_GrPixelConfig:
+ case kSRGBA_8888_GrPixelConfig:
return true;
default:
return false;
@@ -372,6 +377,7 @@ static inline size_t GrBytesPerPixel(GrPixelConfig config) {
return 2;
case kRGBA_8888_GrPixelConfig:
case kBGRA_8888_GrPixelConfig:
+ case kSRGBA_8888_GrPixelConfig:
return 4;
case kRGBA_float_GrPixelConfig:
return 16;
@@ -391,6 +397,7 @@ static inline size_t GrUnpackAlignment(GrPixelConfig config) {
return 2;
case kRGBA_8888_GrPixelConfig:
case kBGRA_8888_GrPixelConfig:
+ case kSRGBA_8888_GrPixelConfig:
case kRGBA_float_GrPixelConfig:
return 4;
default:
« include/core/SkPixelRef.h ('K') | « include/gpu/GrColor.h ('k') | include/gpu/SkGr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698