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

Unified Diff: src/utils/SkTextureCompressor.cpp

Issue 425223006: Revert of Add initial pipeline for decompressors (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 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') | src/utils/SkTextureCompressor_LATC.h » ('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 e0b751f3f775446ec408b6262bb58562a6195b10..30fd3072d5b67e8dab3e9981ebef631509893e7e 100644
--- a/src/utils/SkTextureCompressor.cpp
+++ b/src/utils/SkTextureCompressor.cpp
@@ -20,16 +20,15 @@
namespace SkTextureCompressor {
-void GetBlockDimensions(Format format, int* dimX, int* dimY, bool matchSpec) {
+void GetBlockDimensions(Format format, int* dimX, int* dimY) {
if (NULL == dimX || NULL == dimY) {
return;
}
- if (!matchSpec && SkTextureCompressorGetPlatformDims(format, dimX, dimY)) {
+ if (SkTextureCompressorGetPlatformDims(format, dimX, dimY)) {
return;
}
- // No specialized arguments, return the dimensions as they are in the spec.
switch(format) {
// These formats are 64 bits per 4x4 block.
default:
@@ -160,30 +159,4 @@
return NULL;
}
-bool DecompressBufferFromFormat(uint8_t* dst, int dstRowBytes, const uint8_t* src,
- int width, int height, Format format) {
- int dimX, dimY;
- GetBlockDimensions(format, &dimX, &dimY, true);
-
- if (width < 0 || ((width % dimX) != 0) || height < 0 || ((height % dimY) != 0)) {
- return false;
- }
-
- switch(format) {
- case kLATC_Format:
- DecompressLATC(dst, dstRowBytes, src, width, height);
- return true;
-
- case kR11_EAC_Format:
- DecompressR11EAC(dst, dstRowBytes, src, width, height);
- return true;
-
- case kASTC_12x12_Format:
- // TODO(krajcevski) .. right now just fall through and return false.
- return false;
- }
-
- return false;
-}
-
} // namespace SkTextureCompressor
« no previous file with comments | « src/utils/SkTextureCompressor.h ('k') | src/utils/SkTextureCompressor_LATC.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698