diff options
author | Greg Daniel <egdaniel@google.com> | 2017-11-15 20:48:56 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-11-15 20:49:03 +0000 |
commit | 0fb6db4be6e30777cc5c87f1b601e8c4aacff2b1 (patch) | |
tree | b1a506c856746e6f9b982c2c1f765057eeae59cd /include | |
parent | 42d27c692ecbde284a484bc7e3940df852b55c1b (diff) |
Revert "Add private grpixelconfigs for alpha_8 and alpha_half"
This reverts commit 33d17cbb003975fff895954435183756f9893c17.
Reason for revert: broke intel bots
Original change's description:
> Add private grpixelconfigs for alpha_8 and alpha_half
>
> Bug: skia:
> Change-Id: I5191b6e045aea2a5af2b305b5972ad1e638a7ace
> Reviewed-on: https://skia-review.googlesource.com/71763
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,bsalomon@google.com
Change-Id: I6fff9241f7878f1ec7fad2663df9922c9cd8f628
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/72180
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/gpu/GrTypes.h | 7 | ||||
-rw-r--r-- | include/gpu/mock/GrMockTypes.h | 3 | ||||
-rw-r--r-- | include/private/GrTypesPriv.h | 42 |
3 files changed, 2 insertions, 50 deletions
diff --git a/include/gpu/GrTypes.h b/include/gpu/GrTypes.h index c47cfc8f86..57f32f2504 100644 --- a/include/gpu/GrTypes.h +++ b/include/gpu/GrTypes.h @@ -343,12 +343,7 @@ enum GrPixelConfig { */ kRGBA_half_GrPixelConfig, - kPrivateConfig1_GrPixelConfig, - kPrivateConfig2_GrPixelConfig, - kPrivateConfig3_GrPixelConfig, - kPrivateConfig4_GrPixelConfig, - - kLast_GrPixelConfig = kPrivateConfig4_GrPixelConfig + kLast_GrPixelConfig = kRGBA_half_GrPixelConfig }; static const int kGrPixelConfigCnt = kLast_GrPixelConfig + 1; diff --git a/include/gpu/mock/GrMockTypes.h b/include/gpu/mock/GrMockTypes.h index 35bb5efe23..3ad0fc3b9a 100644 --- a/include/gpu/mock/GrMockTypes.h +++ b/include/gpu/mock/GrMockTypes.h @@ -9,7 +9,6 @@ #define GrMockOptions_DEFINED #include "GrTypes.h" -#include "../private/GrTypesPriv.h" struct GrMockTextureInfo { int fID; @@ -26,8 +25,6 @@ struct GrMockOptions { fConfigOptions[kRGBA_8888_GrPixelConfig].fRenderable[0] = true; fConfigOptions[kRGBA_8888_GrPixelConfig].fTexturable = true; fConfigOptions[kAlpha_8_GrPixelConfig].fTexturable = true; - fConfigOptions[kAlpha_8_as_Alpha_GrPixelConfig].fTexturable = true; - fConfigOptions[kAlpha_8_as_Red_GrPixelConfig].fTexturable = true; fConfigOptions[kRGB_565_GrPixelConfig].fTexturable = true; } diff --git a/include/private/GrTypesPriv.h b/include/private/GrTypesPriv.h index 75ca0ac7ed..a90944064f 100644 --- a/include/private/GrTypesPriv.h +++ b/include/private/GrTypesPriv.h @@ -706,15 +706,6 @@ enum class GrMipMapsStatus { GR_MAKE_BITFIELD_CLASS_OPS(GpuPathRenderers) /** - * We want to extend the GrPixelConfig enum to add cases for dealing with alpha_8 which is - * internally either alpha8 or red8 - */ -static constexpr GrPixelConfig kAlpha_8_as_Alpha_GrPixelConfig = kPrivateConfig1_GrPixelConfig; -static constexpr GrPixelConfig kAlpha_8_as_Red_GrPixelConfig = kPrivateConfig2_GrPixelConfig; -static constexpr GrPixelConfig kAlpha_half_as_Alpha_GrPixelConfig = kPrivateConfig3_GrPixelConfig; -static constexpr GrPixelConfig kAlpha_half_as_Red_GrPixelConfig = kPrivateConfig4_GrPixelConfig; - -/** * Utility functions for GrPixelConfig */ // Returns true if the pixel config is 32 bits per pixel @@ -727,8 +718,6 @@ static inline bool GrPixelConfigIs8888Unorm(GrPixelConfig config) { return true; case kUnknown_GrPixelConfig: case kAlpha_8_GrPixelConfig: - case kAlpha_8_as_Alpha_GrPixelConfig: - case kAlpha_8_as_Red_GrPixelConfig: case kGray_8_GrPixelConfig: case kRGB_565_GrPixelConfig: case kRGBA_4444_GrPixelConfig: @@ -736,8 +725,6 @@ static inline bool GrPixelConfigIs8888Unorm(GrPixelConfig config) { case kRGBA_float_GrPixelConfig: case kRG_float_GrPixelConfig: case kAlpha_half_GrPixelConfig: - case kAlpha_half_as_Alpha_GrPixelConfig: - case kAlpha_half_as_Red_GrPixelConfig: case kRGBA_half_GrPixelConfig: return false; } @@ -754,8 +741,6 @@ static inline bool GrPixelConfigIsSRGB(GrPixelConfig config) { return true; case kUnknown_GrPixelConfig: case kAlpha_8_GrPixelConfig: - case kAlpha_8_as_Alpha_GrPixelConfig: - case kAlpha_8_as_Red_GrPixelConfig: case kGray_8_GrPixelConfig: case kRGB_565_GrPixelConfig: case kRGBA_4444_GrPixelConfig: @@ -765,8 +750,6 @@ static inline bool GrPixelConfigIsSRGB(GrPixelConfig config) { case kRGBA_float_GrPixelConfig: case kRG_float_GrPixelConfig: case kAlpha_half_GrPixelConfig: - case kAlpha_half_as_Alpha_GrPixelConfig: - case kAlpha_half_as_Red_GrPixelConfig: case kRGBA_half_GrPixelConfig: return false; } @@ -788,8 +771,6 @@ static inline GrPixelConfig GrPixelConfigSwapRAndB(GrPixelConfig config) { return kSBGRA_8888_GrPixelConfig; case kUnknown_GrPixelConfig: case kAlpha_8_GrPixelConfig: - case kAlpha_8_as_Alpha_GrPixelConfig: - case kAlpha_8_as_Red_GrPixelConfig: case kGray_8_GrPixelConfig: case kRGB_565_GrPixelConfig: case kRGBA_4444_GrPixelConfig: @@ -797,8 +778,6 @@ static inline GrPixelConfig GrPixelConfigSwapRAndB(GrPixelConfig config) { case kRGBA_float_GrPixelConfig: case kRG_float_GrPixelConfig: case kAlpha_half_GrPixelConfig: - case kAlpha_half_as_Alpha_GrPixelConfig: - case kAlpha_half_as_Red_GrPixelConfig: case kRGBA_half_GrPixelConfig: return kUnknown_GrPixelConfig; } @@ -809,15 +788,11 @@ static inline GrPixelConfig GrPixelConfigSwapRAndB(GrPixelConfig config) { static inline size_t GrBytesPerPixel(GrPixelConfig config) { switch (config) { case kAlpha_8_GrPixelConfig: - case kAlpha_8_as_Alpha_GrPixelConfig: - case kAlpha_8_as_Red_GrPixelConfig: case kGray_8_GrPixelConfig: return 1; case kRGB_565_GrPixelConfig: case kRGBA_4444_GrPixelConfig: case kAlpha_half_GrPixelConfig: - case kAlpha_half_as_Alpha_GrPixelConfig: - case kAlpha_half_as_Red_GrPixelConfig: return 2; case kRGBA_8888_GrPixelConfig: case kBGRA_8888_GrPixelConfig: @@ -845,12 +820,8 @@ static inline bool GrPixelConfigIsOpaque(GrPixelConfig config) { case kRG_float_GrPixelConfig: return true; case kAlpha_8_GrPixelConfig: - case kAlpha_8_as_Alpha_GrPixelConfig: - case kAlpha_8_as_Red_GrPixelConfig: case kRGBA_4444_GrPixelConfig: case kAlpha_half_GrPixelConfig: - case kAlpha_half_as_Alpha_GrPixelConfig: - case kAlpha_half_as_Red_GrPixelConfig: case kRGBA_8888_GrPixelConfig: case kBGRA_8888_GrPixelConfig: case kSRGBA_8888_GrPixelConfig: @@ -868,11 +839,7 @@ static inline bool GrPixelConfigIsOpaque(GrPixelConfig config) { static inline bool GrPixelConfigIsAlphaOnly(GrPixelConfig config) { switch (config) { case kAlpha_8_GrPixelConfig: - case kAlpha_8_as_Alpha_GrPixelConfig: - case kAlpha_8_as_Red_GrPixelConfig: case kAlpha_half_GrPixelConfig: - case kAlpha_half_as_Alpha_GrPixelConfig: - case kAlpha_half_as_Red_GrPixelConfig: return true; case kUnknown_GrPixelConfig: case kGray_8_GrPixelConfig: @@ -897,14 +864,10 @@ static inline bool GrPixelConfigIsFloatingPoint(GrPixelConfig config) { case kRGBA_float_GrPixelConfig: case kRG_float_GrPixelConfig: case kAlpha_half_GrPixelConfig: - case kAlpha_half_as_Alpha_GrPixelConfig: - case kAlpha_half_as_Red_GrPixelConfig: case kRGBA_half_GrPixelConfig: return true; case kUnknown_GrPixelConfig: case kAlpha_8_GrPixelConfig: - case kAlpha_8_as_Alpha_GrPixelConfig: - case kAlpha_8_as_Red_GrPixelConfig: case kGray_8_GrPixelConfig: case kRGB_565_GrPixelConfig: case kRGBA_4444_GrPixelConfig: @@ -926,8 +889,6 @@ static inline bool GrPixelConfigIsSint(GrPixelConfig config) { static inline bool GrPixelConfigIsUnorm(GrPixelConfig config) { switch (config) { case kAlpha_8_GrPixelConfig: - case kAlpha_8_as_Alpha_GrPixelConfig: - case kAlpha_8_as_Red_GrPixelConfig: case kGray_8_GrPixelConfig: case kRGB_565_GrPixelConfig: case kRGBA_4444_GrPixelConfig: @@ -938,8 +899,6 @@ static inline bool GrPixelConfigIsUnorm(GrPixelConfig config) { return true; case kUnknown_GrPixelConfig: case kAlpha_half_GrPixelConfig: - case kAlpha_half_as_Alpha_GrPixelConfig: - case kAlpha_half_as_Red_GrPixelConfig: case kRGBA_8888_sint_GrPixelConfig: case kRGBA_float_GrPixelConfig: case kRG_float_GrPixelConfig: @@ -955,4 +914,5 @@ static inline GrPixelConfigIsClamped GrGetPixelConfigIsClamped(GrPixelConfig con : GrPixelConfigIsClamped::kYes; } + #endif |