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

Unified Diff: src/utils/SkTextureCompressor.cpp

Issue 438443004: Revert of Add ETC1 format to SkTextureCompressor (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 | « src/utils/SkTextureCompressor.h ('k') | tests/TextureCompressionTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkTextureCompressor.cpp
diff --git a/src/utils/SkTextureCompressor.cpp b/src/utils/SkTextureCompressor.cpp
index 4eeebcdcd6fe2e2e412055ecd32c5504a220c306..801328642ff301cd4cad88232373c67316273378 100644
--- a/src/utils/SkTextureCompressor.cpp
+++ b/src/utils/SkTextureCompressor.cpp
@@ -15,20 +15,6 @@
#include "SkEndian.h"
#include "SkTextureCompression_opts.h"
-
-#ifndef SK_IGNORE_ETC1_SUPPORT
-# include "etc1.h"
-#endif
-
-// Convert ETC1 functions to our function signatures
-static bool compress_etc1_565(uint8_t* dst, const uint8_t* src,
- int width, int height, int rowBytes) {
-#ifndef SK_IGNORE_ETC1_SUPPORT
- return 0 == etc1_encode_image(src, width, height, 2, rowBytes, dst);
-#else
- return false;
-#endif
-}
////////////////////////////////////////////////////////////////////////////////
@@ -49,9 +35,8 @@
default:
SkDEBUGFAIL("Unknown compression format!");
// fall through
+ case kR11_EAC_Format:
case kLATC_Format:
- case kR11_EAC_Format:
- case kETC1_Format:
*dimX = 4;
*dimY = 4;
break;
@@ -72,9 +57,8 @@
switch (fmt) {
// These formats are 64 bits per 4x4 block.
+ case kR11_EAC_Format:
case kLATC_Format:
- case kR11_EAC_Format:
- case kETC1_Format:
encodedBlockSize = 8;
break;
@@ -118,19 +102,6 @@
break;
case kASTC_12x12_Format:
proc = CompressA8To12x12ASTC;
- break;
- default:
- // Do nothing...
- break;
- }
- }
- break;
-
- case kRGB_565_SkColorType:
- {
- switch (format) {
- case kETC1_Format:
- proc = compress_etc1_565;
break;
default:
// Do nothing...
@@ -208,10 +179,6 @@
DecompressR11EAC(dst, dstRowBytes, src, width, height);
return true;
-#ifndef SK_IGNORE_ETC1_SUPPORT
- case kETC1_Format:
- return 0 == etc1_decode_image(src, dst, width, height, 3, dstRowBytes);
-#endif
case kASTC_12x12_Format:
// TODO(krajcevski) .. right now just fall through and return false.
return false;
« no previous file with comments | « src/utils/SkTextureCompressor.h ('k') | tests/TextureCompressionTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698