Remove some unused functions (and an enum) from GrTypesPriv

Change-Id: I9b27c073122e615cf2db289de5607d6636658803
Bug: skia:6718
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/246077
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This commit is contained in:
Brian Osman 2019-10-03 13:56:42 -04:00 committed by Skia Commit-Bot
parent 6d0d5a7f60
commit 8acfa4db53
2 changed files with 0 additions and 97 deletions

View File

@ -808,15 +808,6 @@ enum class GrMipMapsStatus {
GR_MAKE_BITFIELD_CLASS_OPS(GpuPathRenderers)
/**
* Describes whether pixel data encoding should be converted to/from linear/sRGB encoding.
*/
enum class GrSRGBConversion {
kNone,
kSRGBToLinear,
kLinearToSRGB,
};
/**
* Utility functions for GrPixelConfig
*/
@ -933,47 +924,6 @@ static constexpr bool GrPixelConfigIsAlphaOnly(GrPixelConfig config) {
SkUNREACHABLE;
}
static constexpr bool GrPixelConfigIsFloatingPoint(GrPixelConfig config) {
switch (config) {
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 kRGB_888X_GrPixelConfig:
case kRG_88_GrPixelConfig:
case kRGBA_8888_GrPixelConfig:
case kBGRA_8888_GrPixelConfig:
case kSRGBA_8888_GrPixelConfig:
case kRGBA_1010102_GrPixelConfig:
case kRGB_ETC1_GrPixelConfig:
case kAlpha_16_GrPixelConfig:
case kRG_1616_GrPixelConfig:
case kRGBA_16161616_GrPixelConfig:
return false;
case kAlpha_half_GrPixelConfig:
case kAlpha_half_as_Lum_GrPixelConfig:
case kAlpha_half_as_Red_GrPixelConfig:
case kRGBA_half_GrPixelConfig:
case kRGBA_half_Clamped_GrPixelConfig:
case kRG_half_GrPixelConfig:
return true;
}
SkUNREACHABLE;
}
static constexpr GrClampType GrPixelConfigClampType(GrPixelConfig config) {
if (!GrPixelConfigIsFloatingPoint(config)) {
return GrClampType::kAuto;
}
return kRGBA_half_Clamped_GrPixelConfig == config ? GrClampType::kManual : GrClampType::kNone;
}
/**
* Returns true if the pixel config is a GPU-specific compressed format
* representation.
@ -1457,38 +1407,6 @@ static constexpr const char* GrBackendApiToStr(GrBackendApi api) {
SkUNREACHABLE;
}
static constexpr const char* GrPixelConfigToStr(GrPixelConfig config) {
switch (config) {
case kUnknown_GrPixelConfig: return "Unknown";
case kAlpha_8_GrPixelConfig: return "Alpha8";
case kAlpha_8_as_Alpha_GrPixelConfig: return "Alpha8_asAlpha";
case kAlpha_8_as_Red_GrPixelConfig: return "Alpha8_asRed";
case kGray_8_GrPixelConfig: return "Gray8";
case kGray_8_as_Lum_GrPixelConfig: return "Gray8_asLum";
case kGray_8_as_Red_GrPixelConfig: return "Gray8_asRed";
case kRGB_565_GrPixelConfig: return "RGB565";
case kRGBA_4444_GrPixelConfig: return "RGBA444";
case kRGBA_8888_GrPixelConfig: return "RGBA8888";
case kRGB_888_GrPixelConfig: return "RGB888";
case kRGB_888X_GrPixelConfig: return "RGB888X";
case kRG_88_GrPixelConfig: return "RG88";
case kBGRA_8888_GrPixelConfig: return "BGRA8888";
case kSRGBA_8888_GrPixelConfig: return "SRGBA8888";
case kRGBA_1010102_GrPixelConfig: return "RGBA1010102";
case kAlpha_half_GrPixelConfig: return "AlphaHalf";
case kAlpha_half_as_Lum_GrPixelConfig: return "AlphaHalf_asLum";
case kAlpha_half_as_Red_GrPixelConfig: return "AlphaHalf_asRed";
case kRGBA_half_GrPixelConfig: return "RGBAHalf";
case kRGBA_half_Clamped_GrPixelConfig: return "RGBAHalfClamped";
case kRGB_ETC1_GrPixelConfig: return "RGBETC1";
case kAlpha_16_GrPixelConfig: return "Alpha16";
case kRG_1616_GrPixelConfig: return "RG1616";
case kRGBA_16161616_GrPixelConfig: return "RGBA16161616";
case kRG_half_GrPixelConfig: return "RGHalf";
}
SkUNREACHABLE;
}
static constexpr const char* GrColorTypeToStr(GrColorType ct) {
switch (ct) {
case GrColorType::kUnknown: return "kUnknown";

View File

@ -230,21 +230,6 @@ void GrCaps::dumpJSON(SkJSONWriter* writer) const {
kBlendEquationSupportNames[fBlendEquationSupport]);
writer->appendString("Map Buffer Support", map_flags_to_string(fMapBufferFlags).c_str());
writer->beginArray("configs");
// TODO: Either move this logic into individual backends dump and do it based on format and
// colorType, or have a loop printing out the defaults for given GrColorTypes. Or both.
for (size_t i = 1; i < kGrPixelConfigCnt; ++i) {
GrPixelConfig config = static_cast<GrPixelConfig>(i);
writer->beginObject(nullptr, false);
writer->appendString("name", GrPixelConfigToStr(config));
//writer->appendS32("max sample count", this->maxRenderTargetSampleCount(config));
// writer->appendBool("texturable", this->isConfigTexturable(config));
writer->endObject();
}
writer->endArray();
this->onDumpJSON(writer);
writer->appendName("shaderCaps");