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: |