Compressed texture API cleanup
Change-Id: I020bf6e79b5511adbd89931120feb76f359d83aa Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264056 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
This commit is contained in:
parent
3dbc701f6d
commit
c558f72165
@ -67,9 +67,9 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void onDraw(GrContext* context, GrRenderTargetContext*, SkCanvas* canvas) override {
|
void onDraw(GrContext* context, GrRenderTargetContext*, SkCanvas* canvas) override {
|
||||||
sk_sp<SkImage> image = SkImage::MakeFromCompressed(context, fETC1Data,
|
auto image = SkImage::MakeFromCompressed(context, fETC1Data,
|
||||||
kTexWidth, kTexHeight,
|
kTexWidth, kTexHeight,
|
||||||
SkImage::CompressionType::kETC1);
|
SkImage::CompressionType::kETC2_RGB8_UNORM);
|
||||||
|
|
||||||
canvas->drawImage(image, 0, 0);
|
canvas->drawImage(image, 0, 0);
|
||||||
}
|
}
|
||||||
|
@ -231,17 +231,25 @@ public:
|
|||||||
return DecodeToTexture(ctx, data->data(), data->size(), subset);
|
return DecodeToTexture(ctx, data->data(), data->size(), subset);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Experimental
|
/*
|
||||||
|
* Experimental:
|
||||||
|
* Skia | GL_COMPRESSED_* | MTLPixelFormat* | VK_FORMAT_*_BLOCK
|
||||||
|
* -------------------------------------------------------------------------------------
|
||||||
|
* kETC2_RGB8_UNORM | ETC1_RGB8 | ETC2_RGB8 (iOS-only)| ETC2_R8G8B8_UNORM
|
||||||
|
* | RGB8_ETC2 | |
|
||||||
|
* -------------------------------------------------------------------------------------
|
||||||
|
* kBC1_RGB8_UNORM | RGB_S3TC_DXT1_EXT | N/A | BC1_RGB_UNORM
|
||||||
|
*/
|
||||||
enum class CompressionType {
|
enum class CompressionType {
|
||||||
kNone,
|
kNone,
|
||||||
kETC1,
|
kETC2_RGB8_UNORM, // the same as ETC1
|
||||||
kBC1_RGB8_UNORM,
|
kBC1_RGB8_UNORM,
|
||||||
kLast = kBC1_RGB8_UNORM,
|
kLast = kBC1_RGB8_UNORM,
|
||||||
};
|
};
|
||||||
|
|
||||||
static constexpr int kCompressionTypeCount = static_cast<int>(CompressionType::kLast) + 1;
|
static constexpr int kCompressionTypeCount = static_cast<int>(CompressionType::kLast) + 1;
|
||||||
|
|
||||||
static const CompressionType kETC1_CompressionType = CompressionType::kETC1;
|
static const CompressionType kETC1_CompressionType = CompressionType::kETC2_RGB8_UNORM;
|
||||||
|
|
||||||
/** Creates a GPU-backed SkImage from compressed data.
|
/** Creates a GPU-backed SkImage from compressed data.
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ struct GrMockOptions {
|
|||||||
|
|
||||||
fConfigOptions[(int)GrColorType::kBGRA_8888] = fConfigOptions[(int)GrColorType::kRGBA_8888];
|
fConfigOptions[(int)GrColorType::kBGRA_8888] = fConfigOptions[(int)GrColorType::kRGBA_8888];
|
||||||
|
|
||||||
fCompressedOptions[(int)SkImage::CompressionType::kETC1].fTexturable = true;
|
fCompressedOptions[(int)SkImage::CompressionType::kETC2_RGB8_UNORM].fTexturable = true;
|
||||||
fCompressedOptions[(int)SkImage::CompressionType::kBC1_RGB8_UNORM].fTexturable = true;
|
fCompressedOptions[(int)SkImage::CompressionType::kBC1_RGB8_UNORM].fTexturable = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1285,7 +1285,7 @@ static constexpr GrPixelConfig GrColorTypeToPixelConfig(GrColorType colorType) {
|
|||||||
static constexpr GrPixelConfig GrCompressionTypeToPixelConfig(SkImage::CompressionType compression) {
|
static constexpr GrPixelConfig GrCompressionTypeToPixelConfig(SkImage::CompressionType compression) {
|
||||||
switch (compression) {
|
switch (compression) {
|
||||||
case SkImage::CompressionType::kNone: return kUnknown_GrPixelConfig;
|
case SkImage::CompressionType::kNone: return kUnknown_GrPixelConfig;
|
||||||
case SkImage::CompressionType::kETC1: return kRGB_ETC1_GrPixelConfig;
|
case SkImage::CompressionType::kETC2_RGB8_UNORM: return kRGB_ETC1_GrPixelConfig;
|
||||||
case SkImage::CompressionType::kBC1_RGB8_UNORM: return kRGB_BC1_GrPixelConfig;
|
case SkImage::CompressionType::kBC1_RGB8_UNORM: return kRGB_BC1_GrPixelConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1360,7 +1360,7 @@ static constexpr const char* GrColorTypeToStr(GrColorType ct) {
|
|||||||
static constexpr const char* GrCompressionTypeToStr(SkImage::CompressionType compression) {
|
static constexpr const char* GrCompressionTypeToStr(SkImage::CompressionType compression) {
|
||||||
switch (compression) {
|
switch (compression) {
|
||||||
case SkImage::CompressionType::kNone: return "kNone";
|
case SkImage::CompressionType::kNone: return "kNone";
|
||||||
case SkImage::CompressionType::kETC1: return "kETC1";
|
case SkImage::CompressionType::kETC2_RGB8_UNORM: return "kETC2_RGB8_UNORM";
|
||||||
case SkImage::CompressionType::kBC1_RGB8_UNORM: return "kBC1_RGB8_UNORM";
|
case SkImage::CompressionType::kBC1_RGB8_UNORM: return "kBC1_RGB8_UNORM";
|
||||||
}
|
}
|
||||||
SkUNREACHABLE;
|
SkUNREACHABLE;
|
||||||
|
@ -160,7 +160,7 @@ size_t GrCompressedDataSize(SkImage::CompressionType type, SkISize dimensions,
|
|||||||
switch (type) {
|
switch (type) {
|
||||||
case SkImage::CompressionType::kNone:
|
case SkImage::CompressionType::kNone:
|
||||||
break;
|
break;
|
||||||
case SkImage::CompressionType::kETC1:
|
case SkImage::CompressionType::kETC2_RGB8_UNORM:
|
||||||
case SkImage::CompressionType::kBC1_RGB8_UNORM: {
|
case SkImage::CompressionType::kBC1_RGB8_UNORM: {
|
||||||
for (int i = 0; i < numMipLevels; ++i) {
|
for (int i = 0; i < numMipLevels; ++i) {
|
||||||
int numBlocks = num_ETC1_blocks(dimensions.width(), dimensions.height());
|
int numBlocks = num_ETC1_blocks(dimensions.width(), dimensions.height());
|
||||||
@ -190,7 +190,7 @@ size_t GrCompressedRowBytes(SkImage::CompressionType type, int width) {
|
|||||||
case SkImage::CompressionType::kNone:
|
case SkImage::CompressionType::kNone:
|
||||||
return 0;
|
return 0;
|
||||||
case SkImage::CompressionType::kBC1_RGB8_UNORM:
|
case SkImage::CompressionType::kBC1_RGB8_UNORM:
|
||||||
case SkImage::CompressionType::kETC1:
|
case SkImage::CompressionType::kETC2_RGB8_UNORM:
|
||||||
int numBlocksWidth = num_ETC1_blocks_w(width);
|
int numBlocksWidth = num_ETC1_blocks_w(width);
|
||||||
|
|
||||||
static_assert(sizeof(ETC1Block) == sizeof(BC1Block));
|
static_assert(sizeof(ETC1Block) == sizeof(BC1Block));
|
||||||
@ -204,7 +204,7 @@ SkISize GrCompressedDimensions(SkImage::CompressionType type, SkISize baseDimens
|
|||||||
case SkImage::CompressionType::kNone:
|
case SkImage::CompressionType::kNone:
|
||||||
return baseDimensions;
|
return baseDimensions;
|
||||||
case SkImage::CompressionType::kBC1_RGB8_UNORM:
|
case SkImage::CompressionType::kBC1_RGB8_UNORM:
|
||||||
case SkImage::CompressionType::kETC1:
|
case SkImage::CompressionType::kETC2_RGB8_UNORM:
|
||||||
int numBlocksWidth = num_ETC1_blocks_w(baseDimensions.width());
|
int numBlocksWidth = num_ETC1_blocks_w(baseDimensions.width());
|
||||||
int numBlocksHeight = num_ETC1_blocks_w(baseDimensions.height());
|
int numBlocksHeight = num_ETC1_blocks_w(baseDimensions.height());
|
||||||
|
|
||||||
@ -294,7 +294,7 @@ void GrFillInCompressedData(SkImage::CompressionType type, SkISize dimensions,
|
|||||||
for (int i = 0; i < numMipLevels; ++i) {
|
for (int i = 0; i < numMipLevels; ++i) {
|
||||||
size_t levelSize = GrCompressedDataSize(type, dimensions, nullptr, GrMipMapped::kNo);
|
size_t levelSize = GrCompressedDataSize(type, dimensions, nullptr, GrMipMapped::kNo);
|
||||||
|
|
||||||
if (SkImage::CompressionType::kETC1 == type) {
|
if (SkImage::CompressionType::kETC2_RGB8_UNORM == type) {
|
||||||
fillin_ETC1_with_color(dimensions, colorf, &dstPixels[offset]);
|
fillin_ETC1_with_color(dimensions, colorf, &dstPixels[offset]);
|
||||||
} else {
|
} else {
|
||||||
SkASSERT(type == SkImage::CompressionType::kBC1_RGB8_UNORM);
|
SkASSERT(type == SkImage::CompressionType::kBC1_RGB8_UNORM);
|
||||||
|
@ -3988,9 +3988,9 @@ SkImage::CompressionType GrGLCaps::compressionType(const GrBackendFormat& format
|
|||||||
auto fmt = format.asGLFormat();
|
auto fmt = format.asGLFormat();
|
||||||
|
|
||||||
switch (fmt) {
|
switch (fmt) {
|
||||||
case GrGLFormat::kCOMPRESSED_ETC1_RGB8: // same compression layout as RGB8_ETC2
|
case GrGLFormat::kCOMPRESSED_ETC1_RGB8: // same compression layout as ETC2_RGB8_UNORM
|
||||||
case GrGLFormat::kCOMPRESSED_RGB8_ETC2:
|
case GrGLFormat::kCOMPRESSED_RGB8_ETC2:
|
||||||
return SkImage::CompressionType::kETC1;
|
return SkImage::CompressionType::kETC2_RGB8_UNORM;
|
||||||
case GrGLFormat::kCOMPRESSED_RGB8_BC1:
|
case GrGLFormat::kCOMPRESSED_RGB8_BC1:
|
||||||
return SkImage::CompressionType::kBC1_RGB8_UNORM;
|
return SkImage::CompressionType::kBC1_RGB8_UNORM;
|
||||||
default:
|
default:
|
||||||
@ -4295,7 +4295,7 @@ GrBackendFormat GrGLCaps::getBackendFormatFromCompressionType(
|
|||||||
switch (compressionType) {
|
switch (compressionType) {
|
||||||
case SkImage::CompressionType::kNone:
|
case SkImage::CompressionType::kNone:
|
||||||
return {};
|
return {};
|
||||||
case SkImage::CompressionType::kETC1:
|
case SkImage::CompressionType::kETC2_RGB8_UNORM:
|
||||||
// if ETC2 is available default to that format
|
// if ETC2 is available default to that format
|
||||||
if (this->isFormatTexturable(GrGLFormat::kCOMPRESSED_RGB8_ETC2)) {
|
if (this->isFormatTexturable(GrGLFormat::kCOMPRESSED_RGB8_ETC2)) {
|
||||||
return GrBackendFormat::MakeGL(GR_GL_COMPRESSED_RGB8_ETC2, GR_GL_TEXTURE_2D);
|
return GrBackendFormat::MakeGL(GR_GL_COMPRESSED_RGB8_ETC2, GR_GL_TEXTURE_2D);
|
||||||
|
@ -258,6 +258,11 @@
|
|||||||
#define GR_GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
|
#define GR_GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
|
||||||
#define GR_GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
|
#define GR_GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
|
||||||
|
|
||||||
|
#define GR_GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C
|
||||||
|
#define GR_GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
|
||||||
|
#define GR_GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
|
||||||
|
#define GR_GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
|
||||||
|
|
||||||
#define GR_GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
|
#define GR_GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
|
||||||
#define GR_GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
|
#define GR_GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
|
||||||
#define GR_GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
|
#define GR_GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
|
||||||
@ -274,11 +279,11 @@
|
|||||||
#define GR_GL_COMPRESSED_SIGNED_RG11_EAC 0x9273
|
#define GR_GL_COMPRESSED_SIGNED_RG11_EAC 0x9273
|
||||||
|
|
||||||
#define GR_GL_COMPRESSED_RGB8_ETC2 0x9274
|
#define GR_GL_COMPRESSED_RGB8_ETC2 0x9274
|
||||||
#define GR_GL_COMPRESSED_SRGB8 0x9275
|
#define GR_GL_COMPRESSED_SRGB8_ETC2 0x9275
|
||||||
#define GR_GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1 0x9276
|
#define GR_GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1 0x9276
|
||||||
#define GR_GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1 0x9277
|
#define GR_GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1 0x9277
|
||||||
#define GR_GL_COMPRESSED_RGBA8_ETC2 0x9278
|
#define GR_GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278
|
||||||
#define GR_GL_COMPRESSED_SRGB8_ALPHA8_ETC2 0x9279
|
#define GR_GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279
|
||||||
|
|
||||||
#define GR_GL_COMPRESSED_LUMINANCE_LATC1 0x8C70
|
#define GR_GL_COMPRESSED_LUMINANCE_LATC1 0x8C70
|
||||||
#define GR_GL_COMPRESSED_SIGNED_LUMINANCE_LATC1 0x8C71
|
#define GR_GL_COMPRESSED_SIGNED_LUMINANCE_LATC1 0x8C71
|
||||||
|
@ -667,7 +667,7 @@ SkImage::CompressionType GrGLFormatToCompressionType(GrGLFormat format) {
|
|||||||
switch (format) {
|
switch (format) {
|
||||||
case GrGLFormat::kCOMPRESSED_RGB8_ETC2:
|
case GrGLFormat::kCOMPRESSED_RGB8_ETC2:
|
||||||
case GrGLFormat::kCOMPRESSED_ETC1_RGB8:
|
case GrGLFormat::kCOMPRESSED_ETC1_RGB8:
|
||||||
return SkImage::CompressionType::kETC1;
|
return SkImage::CompressionType::kETC2_RGB8_UNORM;
|
||||||
case GrGLFormat::kCOMPRESSED_RGB8_BC1:
|
case GrGLFormat::kCOMPRESSED_RGB8_BC1:
|
||||||
return SkImage::CompressionType::kBC1_RGB8_UNORM;
|
return SkImage::CompressionType::kBC1_RGB8_UNORM;
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ std::vector<GrCaps::TestFormatColorTypeCombination> GrMockCaps::getTestingCombin
|
|||||||
SkImage::CompressionType::kNone)},
|
SkImage::CompressionType::kNone)},
|
||||||
// For these two compressed image formats the color type will effectively be RGB_888x
|
// For these two compressed image formats the color type will effectively be RGB_888x
|
||||||
{ GrColorType::kRGB_888x, GrBackendFormat::MakeMock(GrColorType::kUnknown,
|
{ GrColorType::kRGB_888x, GrBackendFormat::MakeMock(GrColorType::kUnknown,
|
||||||
SkImage::CompressionType::kETC1)},
|
SkImage::CompressionType::kETC2_RGB8_UNORM)},
|
||||||
{ GrColorType::kRGB_888x, GrBackendFormat::MakeMock(GrColorType::kUnknown,
|
{ GrColorType::kRGB_888x, GrBackendFormat::MakeMock(GrColorType::kUnknown,
|
||||||
SkImage::CompressionType::kBC1_RGB8_UNORM)},
|
SkImage::CompressionType::kBC1_RGB8_UNORM)},
|
||||||
|
|
||||||
|
@ -221,7 +221,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
SkImage::CompressionType compression = format.asMockCompressionType();
|
SkImage::CompressionType compression = format.asMockCompressionType();
|
||||||
if (compression == SkImage::CompressionType::kETC1 ||
|
if (compression == SkImage::CompressionType::kETC2_RGB8_UNORM ||
|
||||||
compression == SkImage::CompressionType::kBC1_RGB8_UNORM) {
|
compression == SkImage::CompressionType::kBC1_RGB8_UNORM) {
|
||||||
return ct == GrColorType::kRGB_888x; // TODO: this may be too restrictive
|
return ct == GrColorType::kRGB_888x; // TODO: this may be too restrictive
|
||||||
}
|
}
|
||||||
|
@ -319,7 +319,7 @@ SkImage::CompressionType GrMtlCaps::compressionType(const GrBackendFormat& forma
|
|||||||
switch (GrBackendFormatAsMTLPixelFormat(format)) {
|
switch (GrBackendFormatAsMTLPixelFormat(format)) {
|
||||||
case MTLPixelFormatETC2_RGB8:
|
case MTLPixelFormatETC2_RGB8:
|
||||||
// ETC2 uses the same compression layout as ETC1
|
// ETC2 uses the same compression layout as ETC1
|
||||||
return SkImage::CompressionType::kETC1;
|
return SkImage::CompressionType::kETC2_RGB8_UNORM;
|
||||||
default:
|
default:
|
||||||
return SkImage::CompressionType::kNone;
|
return SkImage::CompressionType::kNone;
|
||||||
}
|
}
|
||||||
@ -1040,7 +1040,7 @@ GrBackendFormat GrMtlCaps::getBackendFormatFromCompressionType(
|
|||||||
switch (compressionType) {
|
switch (compressionType) {
|
||||||
case SkImage::CompressionType::kNone:
|
case SkImage::CompressionType::kNone:
|
||||||
return {};
|
return {};
|
||||||
case SkImage::CompressionType::kETC1:
|
case SkImage::CompressionType::kETC2_RGB8_UNORM:
|
||||||
#ifdef SK_BUILD_FOR_MAC
|
#ifdef SK_BUILD_FOR_MAC
|
||||||
return {};
|
return {};
|
||||||
#else
|
#else
|
||||||
|
@ -309,7 +309,7 @@ bool GrMtlFormatIsCompressed(MTLPixelFormat mtlFormat) {
|
|||||||
SkImage::CompressionType GrMtlFormatToCompressionType(MTLPixelFormat mtlFormat) {
|
SkImage::CompressionType GrMtlFormatToCompressionType(MTLPixelFormat mtlFormat) {
|
||||||
switch (mtlFormat) {
|
switch (mtlFormat) {
|
||||||
#ifdef SK_BUILD_FOR_IOS
|
#ifdef SK_BUILD_FOR_IOS
|
||||||
case MTLPixelFormatETC2_RGB8: return SkImage::CompressionType::kETC1;
|
case MTLPixelFormatETC2_RGB8: return SkImage::CompressionType::kETC2_RGB8_UNORM;
|
||||||
#endif
|
#endif
|
||||||
default: return SkImage::CompressionType::kNone;
|
default: return SkImage::CompressionType::kNone;
|
||||||
}
|
}
|
||||||
|
@ -1281,7 +1281,7 @@ SkImage::CompressionType GrVkCaps::compressionType(const GrBackendFormat& format
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (vkFormat) {
|
switch (vkFormat) {
|
||||||
case VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK: return SkImage::CompressionType::kETC1;
|
case VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK: return SkImage::CompressionType::kETC2_RGB8_UNORM;
|
||||||
case VK_FORMAT_BC1_RGB_UNORM_BLOCK: return SkImage::CompressionType::kBC1_RGB8_UNORM;
|
case VK_FORMAT_BC1_RGB_UNORM_BLOCK: return SkImage::CompressionType::kBC1_RGB8_UNORM;
|
||||||
default: return SkImage::CompressionType::kNone;
|
default: return SkImage::CompressionType::kNone;
|
||||||
}
|
}
|
||||||
@ -1704,7 +1704,7 @@ GrBackendFormat GrVkCaps::getBackendFormatFromCompressionType(
|
|||||||
switch (compressionType) {
|
switch (compressionType) {
|
||||||
case SkImage::CompressionType::kNone:
|
case SkImage::CompressionType::kNone:
|
||||||
return {};
|
return {};
|
||||||
case SkImage::CompressionType::kETC1:
|
case SkImage::CompressionType::kETC2_RGB8_UNORM:
|
||||||
if (this->isVkFormatTexturable(VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK)) {
|
if (this->isVkFormatTexturable(VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK)) {
|
||||||
return GrBackendFormat::MakeVk(VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK);
|
return GrBackendFormat::MakeVk(VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK);
|
||||||
}
|
}
|
||||||
|
@ -185,7 +185,7 @@ bool GrVkFormatIsCompressed(VkFormat vkFormat) {
|
|||||||
|
|
||||||
SkImage::CompressionType GrVkFormatToCompressionType(VkFormat vkFormat) {
|
SkImage::CompressionType GrVkFormatToCompressionType(VkFormat vkFormat) {
|
||||||
switch (vkFormat) {
|
switch (vkFormat) {
|
||||||
case VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK: return SkImage::CompressionType::kETC1;
|
case VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK: return SkImage::CompressionType::kETC2_RGB8_UNORM;
|
||||||
case VK_FORMAT_BC1_RGB_UNORM_BLOCK: return SkImage::CompressionType::kBC1_RGB8_UNORM;
|
case VK_FORMAT_BC1_RGB_UNORM_BLOCK: return SkImage::CompressionType::kBC1_RGB8_UNORM;
|
||||||
default: return SkImage::CompressionType::kNone;
|
default: return SkImage::CompressionType::kNone;
|
||||||
}
|
}
|
||||||
|
@ -186,7 +186,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(CompressedBackendAllocationTest, reporter, ct
|
|||||||
SkImage::CompressionType fCompression;
|
SkImage::CompressionType fCompression;
|
||||||
SkColor4f fColor;
|
SkColor4f fColor;
|
||||||
} combinations[] = {
|
} combinations[] = {
|
||||||
{ SkImage::CompressionType::kETC1, SkColors::kRed },
|
{ SkImage::CompressionType::kETC2_RGB8_UNORM, SkColors::kRed },
|
||||||
{ SkImage::CompressionType::kBC1_RGB8_UNORM, SkColors::kBlue },
|
{ SkImage::CompressionType::kBC1_RGB8_UNORM, SkColors::kBlue },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user