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

Unified Diff: include/gpu/GrTypes.h

Issue 1148243002: Add RGBA half float texture format. (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 | « include/gpu/GrColor.h ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrTypes.h
diff --git a/include/gpu/GrTypes.h b/include/gpu/GrTypes.h
index c1d324bad06e7486df496e880a011a01ab30b96f..b38608e66696f5caaa6661e7662941fb9101974d 100644
--- a/include/gpu/GrTypes.h
+++ b/include/gpu/GrTypes.h
@@ -250,7 +250,12 @@ enum GrPixelConfig {
*/
kAlpha_half_GrPixelConfig,
- kLast_GrPixelConfig = kAlpha_half_GrPixelConfig
+ /**
+ * Byte order is r, g, b, a. This color format is 16 bits per channel
+ */
+ kRGBA_half_GrPixelConfig,
+
+ kLast_GrPixelConfig = kRGBA_half_GrPixelConfig
};
static const int kGrPixelConfigCnt = kLast_GrPixelConfig + 1;
@@ -335,6 +340,8 @@ static inline size_t GrBytesPerPixel(GrPixelConfig config) {
case kBGRA_8888_GrPixelConfig:
case kSRGBA_8888_GrPixelConfig:
return 4;
+ case kRGBA_half_GrPixelConfig:
+ return 8;
case kRGBA_float_GrPixelConfig:
return 16;
default:
@@ -350,6 +357,7 @@ static inline size_t GrUnpackAlignment(GrPixelConfig config) {
case kRGB_565_GrPixelConfig:
case kRGBA_4444_GrPixelConfig:
case kAlpha_half_GrPixelConfig:
+ case kRGBA_half_GrPixelConfig:
return 2;
case kRGBA_8888_GrPixelConfig:
case kBGRA_8888_GrPixelConfig:
« no previous file with comments | « include/gpu/GrColor.h ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698