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

Unified Diff: tests/TextureCompressionTest.cpp

Issue 447343002: Revert of - Add astcbitmap to gm slides (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 months 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 | « tests/ImageDecodingTest.cpp ('k') | third_party/ktx/ktx.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/TextureCompressionTest.cpp
diff --git a/tests/TextureCompressionTest.cpp b/tests/TextureCompressionTest.cpp
index da7a87bd41d36530e5b48283f2cd675a59f45e33..8694389fe7ad0e4b1ea7dfd199630076cb223c36 100644
--- a/tests/TextureCompressionTest.cpp
+++ b/tests/TextureCompressionTest.cpp
@@ -11,32 +11,6 @@
#include "SkImageInfo.h"
#include "SkTextureCompressor.h"
#include "Test.h"
-
-// TODO: Create separate tests for RGB and RGBA data once
-// ASTC and ETC1 decompression is implemented.
-
-static bool decompresses_a8(SkTextureCompressor::Format fmt) {
- switch (fmt) {
- case SkTextureCompressor::kLATC_Format:
- case SkTextureCompressor::kR11_EAC_Format:
- return true;
-
- default:
- return false;
- }
-}
-
-static bool compresses_a8(SkTextureCompressor::Format fmt) {
- switch (fmt) {
- case SkTextureCompressor::kLATC_Format:
- case SkTextureCompressor::kR11_EAC_Format:
- case SkTextureCompressor::kASTC_12x12_Format:
- return true;
-
- default:
- return false;
- }
-}
/**
* Make sure that we properly fail when we don't have multiple of four image dimensions.
@@ -64,9 +38,6 @@
for (int i = 0; i < SkTextureCompressor::kFormatCnt; ++i) {
const SkTextureCompressor::Format fmt = static_cast<SkTextureCompressor::Format>(i);
- if (!compresses_a8(fmt)) {
- continue;
- }
SkAutoDataUnref data(SkTextureCompressor::CompressBitmapToFormat(bitmap, fmt));
REPORTER_ASSERT(reporter, NULL == data);
}
@@ -98,9 +69,6 @@
for (int i = 0; i < SkTextureCompressor::kFormatCnt; ++i) {
const SkTextureCompressor::Format fmt = static_cast<SkTextureCompressor::Format>(i);
- if (!compresses_a8(fmt)) {
- continue;
- }
SkAutoDataUnref data(SkTextureCompressor::CompressBitmapToFormat(bitmap, fmt));
REPORTER_ASSERT(reporter, NULL == data);
}
@@ -166,7 +134,10 @@
// Ignore formats for RGBA data, since the decompressed buffer
// won't match the size and contents of the original.
- if (!decompresses_a8(fmt) || !compresses_a8(fmt)) {
+ // TODO: Create separate tests for RGB and RGBA data once
+ // ASTC and ETC1 decompression is implemented.
+ if (SkTextureCompressor::kASTC_12x12_Format == fmt ||
+ SkTextureCompressor::kETC1_Format == fmt) {
continue;
}
« no previous file with comments | « tests/ImageDecodingTest.cpp ('k') | third_party/ktx/ktx.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698