Remove unused GrPixelConfig functions

Change-Id: I1847a96cb8253a8bd047c06d24cba92c8dc04667
Reviewed-on: https://skia-review.googlesource.com/140440
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This commit is contained in:
Brian Osman 2018-07-11 09:21:34 -04:00 committed by Skia Commit-Bot
parent 4ec72f7cc7
commit d17444d5f3

View File

@ -982,39 +982,6 @@ static inline GrSRGBEncoded GrPixelConfigIsSRGBEncoded(GrPixelConfig config) {
static inline bool GrPixelConfigIsSRGB(GrPixelConfig config) {
return GrSRGBEncoded::kYes == GrPixelConfigIsSRGBEncoded(config);
}
// Takes a config and returns the equivalent config with the R and B order
// swapped if such a config exists. Otherwise, kUnknown_GrPixelConfig
static inline GrPixelConfig GrPixelConfigSwapRAndB(GrPixelConfig config) {
switch (config) {
case kBGRA_8888_GrPixelConfig:
return kRGBA_8888_GrPixelConfig;
case kRGBA_8888_GrPixelConfig:
return kBGRA_8888_GrPixelConfig;
case kSBGRA_8888_GrPixelConfig:
return kSRGBA_8888_GrPixelConfig;
case kSRGBA_8888_GrPixelConfig:
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 kGray_8_as_Lum_GrPixelConfig:
case kGray_8_as_Red_GrPixelConfig:
case kRGB_565_GrPixelConfig:
case kRGBA_4444_GrPixelConfig:
case kRGB_888_GrPixelConfig:
case kRGBA_1010102_GrPixelConfig:
case kRGBA_float_GrPixelConfig:
case kRG_float_GrPixelConfig:
case kAlpha_half_GrPixelConfig:
case kAlpha_half_as_Red_GrPixelConfig:
case kRGBA_half_GrPixelConfig:
return kUnknown_GrPixelConfig;
}
SK_ABORT("Invalid pixel config");
return kUnknown_GrPixelConfig;
}
static inline size_t GrBytesPerPixel(GrPixelConfig config) {
switch (config) {
@ -1137,35 +1104,6 @@ static inline bool GrPixelConfigIsFloatingPoint(GrPixelConfig config) {
return false;
}
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 kGray_8_as_Lum_GrPixelConfig:
case kGray_8_as_Red_GrPixelConfig:
case kRGB_565_GrPixelConfig:
case kRGBA_4444_GrPixelConfig:
case kRGBA_8888_GrPixelConfig:
case kRGB_888_GrPixelConfig:
case kBGRA_8888_GrPixelConfig:
case kSRGBA_8888_GrPixelConfig:
case kSBGRA_8888_GrPixelConfig:
case kRGBA_1010102_GrPixelConfig:
return true;
case kUnknown_GrPixelConfig:
case kAlpha_half_GrPixelConfig:
case kAlpha_half_as_Red_GrPixelConfig:
case kRGBA_float_GrPixelConfig:
case kRG_float_GrPixelConfig:
case kRGBA_half_GrPixelConfig:
return false;
}
SK_ABORT("Invalid pixel config.");
return false;
}
/**
* Precision qualifier that should be used with a sampler.
*/