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

Unified Diff: src/images/SkImageDecoder_pkm.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/gpu/GrSWMaskHelper.cpp ('k') | src/utils/SkTextureCompressor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkImageDecoder_pkm.cpp
diff --git a/src/images/SkImageDecoder_pkm.cpp b/src/images/SkImageDecoder_pkm.cpp
index f5fd4b3fbcad54f7c2327b1c072159a97b0b1a73..738d98ec292c5472dfb16b04fd452713a79d4f98 100644
--- a/src/images/SkImageDecoder_pkm.cpp
+++ b/src/images/SkImageDecoder_pkm.cpp
@@ -10,7 +10,6 @@
#include "SkScaledBitmapSampler.h"
#include "SkStream.h"
#include "SkStreamPriv.h"
-#include "SkTextureCompressor.h"
#include "SkTypes.h"
#include "etc1.h"
@@ -81,11 +80,10 @@
// ETC1 Data is encoded as RGB pixels, so we should extract it as such
int nPixels = width * height;
SkAutoMalloc outRGBData(nPixels * 3);
- uint8_t *outRGBDataPtr = reinterpret_cast<uint8_t *>(outRGBData.get());
+ etc1_byte *outRGBDataPtr = reinterpret_cast<etc1_byte *>(outRGBData.get());
// Decode ETC1
- if (!SkTextureCompressor::DecompressBufferFromFormat(
- outRGBDataPtr, width*3, buf, width, height, SkTextureCompressor::kETC1_Format)) {
+ if (etc1_decode_image(buf, outRGBDataPtr, width, height, 3, width*3)) {
return false;
}
« no previous file with comments | « src/gpu/GrSWMaskHelper.cpp ('k') | src/utils/SkTextureCompressor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698