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

Unified Diff: include/gpu/GrTypes.h

Issue 762923003: Add support for half float alpha textures. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix config setup 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
« no previous file with comments | « include/gpu/GrColor.h ('k') | src/core/SkHalf.h » ('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 0ef964dcc4ea66844c6f0ce03944932414ba6567..1ed7070d4404a0509af6f2b2a6e4dae37effaefb 100644
--- a/include/gpu/GrTypes.h
+++ b/include/gpu/GrTypes.h
@@ -302,7 +302,13 @@ enum GrPixelConfig {
* Byte order is r, g, b, a. This color format is 32 bits per channel
*/
kRGBA_float_GrPixelConfig,
- kLast_GrPixelConfig = kRGBA_float_GrPixelConfig
+
+ /**
+ * This color format is a single 16 bit float channel
+ */
+ kAlpha_half_GrPixelConfig,
+
+ kLast_GrPixelConfig = kAlpha_half_GrPixelConfig
};
static const int kGrPixelConfigCnt = kLast_GrPixelConfig + 1;
@@ -364,6 +370,7 @@ static inline size_t GrBytesPerPixel(GrPixelConfig config) {
return 1;
case kRGB_565_GrPixelConfig:
case kRGBA_4444_GrPixelConfig:
+ case kAlpha_half_GrPixelConfig:
return 2;
case kRGBA_8888_GrPixelConfig:
case kBGRA_8888_GrPixelConfig:
@@ -382,6 +389,7 @@ static inline size_t GrUnpackAlignment(GrPixelConfig config) {
return 1;
case kRGB_565_GrPixelConfig:
case kRGBA_4444_GrPixelConfig:
+ case kAlpha_half_GrPixelConfig:
return 2;
case kRGBA_8888_GrPixelConfig:
case kBGRA_8888_GrPixelConfig:
@@ -408,6 +416,7 @@ static inline bool GrPixelConfigIsAlphaOnly(GrPixelConfig config) {
case kLATC_GrPixelConfig:
case kASTC_12x12_GrPixelConfig:
case kAlpha_8_GrPixelConfig:
+ case kAlpha_half_GrPixelConfig:
return true;
default:
return false;
« no previous file with comments | « include/gpu/GrColor.h ('k') | src/core/SkHalf.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698