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

Unified Diff: src/codec/SkCodec_wbmp.cpp

Issue 1285173003: Revert of SkScaledCodec class (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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/codec/SkCodec_libpng.cpp ('k') | src/codec/SkJpegCodec.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkCodec_wbmp.cpp
diff --git a/src/codec/SkCodec_wbmp.cpp b/src/codec/SkCodec_wbmp.cpp
index 3081a3bba9c47b45af5c376616465e507ef65873..6f98294fc65f3cc950b68c255ac9978f8ac428c0 100644
--- a/src/codec/SkCodec_wbmp.cpp
+++ b/src/codec/SkCodec_wbmp.cpp
@@ -9,7 +9,6 @@
#include "SkCodecPriv.h"
#include "SkColorPriv.h"
#include "SkColorTable.h"
-#include "SkScaledCodec.h"
#include "SkStream.h"
#include "SkCodec_wbmp.h"
@@ -81,8 +80,8 @@
case kIndex_8_SkColorType:
case kN32_SkColorType:
case kGray_8_SkColorType:
- return SkSwizzler::CreateSwizzler(SkSwizzler::kBit, ctable, info, opts.fZeroInitialized,
- this->getInfo());
+ return SkSwizzler::CreateSwizzler(
+ SkSwizzler::kBit, ctable, info, opts.fZeroInitialized);
default:
return NULL;
}
@@ -202,9 +201,7 @@
return SkCodec::kUnimplemented;
}
if (dstInfo.dimensions() != this->getInfo().dimensions()) {
- if (!SkScaledCodec::DimensionsSupportedForSampling(this->getInfo(), dstInfo)) {
- return SkCodec::kInvalidScale;
- }
+ return SkCodec::kInvalidScale;
}
if (!valid_alpha(dstInfo.alphaType(), this->getInfo().alphaType())) {
@@ -223,14 +220,10 @@
fSwizzler.reset(fCodec->initializeSwizzler(dstInfo,
get_color_ptr(fColorTable.get()), options));
if (NULL == fSwizzler.get()) {
- return SkCodec::kInvalidConversion;
+ return SkCodec::kInvalidInput;
}
return SkCodec::kSuccess;
- }
-
- SkEncodedFormat onGetEncodedFormat() const {
- return kWBMP_SkEncodedFormat;
}
private:
« no previous file with comments | « src/codec/SkCodec_libpng.cpp ('k') | src/codec/SkJpegCodec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698