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

Unified Diff: include/codec/SkScanlineDecoder.h

Issue 1294593002: 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 | « include/codec/SkScaledCodec.h ('k') | src/codec/SkBmpStandardCodec.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/codec/SkScanlineDecoder.h
diff --git a/include/codec/SkScanlineDecoder.h b/include/codec/SkScanlineDecoder.h
index c547f6701f667d2ecfd61f7dca2154f164c19242..c233663dbdb2d216349eed791744e20eec060f3f 100644
--- a/include/codec/SkScanlineDecoder.h
+++ b/include/codec/SkScanlineDecoder.h
@@ -44,18 +44,6 @@
* scanlines at the bottom of the image that have been ignored.
*/
virtual ~SkScanlineDecoder() {}
-
- /**
- * Return a size that approximately supports the desired scale factor.
- * The codec may not be able to scale efficiently to the exact scale
- * factor requested, so return a size that approximates that scale.
- * The returned value is the codec's suggestion for the closest valid
- * scale that it can natively support
- * FIXME: share this with SkCodec
- */
- SkISize getScaledDimensions(float desiredScale) {
- return this->onGetScaledDimensions(desiredScale);
- }
/**
* Returns the default info, corresponding to the encoded data.
@@ -147,43 +135,13 @@
return this->onReallyHasAlpha();
}
- /**
- * Format of the encoded data.
- */
- SkEncodedFormat getEncodedFormat() const { return this->onGetEncodedFormat(); }
-
- /**
- * returns true if the image must be scaled, in the y direction, after reading, not during.
- * To scale afterwards, we first decode every line and then sample the lines we want afterwards.
- * An example is interlaced pngs, where calling getScanlines once (regardless of the count
- * used) needs to read the entire image, therefore it is inefficient to call
- * getScanlines more than once. Instead, it should only ever be called with all the
- * rows needed.
- */
- bool requiresPostYSampling() {
- return this->onRequiresPostYSampling();
- }
-
protected:
SkScanlineDecoder(const SkImageInfo& srcInfo)
: fSrcInfo(srcInfo)
, fDstInfo()
, fCurrScanline(0) {}
- virtual SkISize onGetScaledDimensions(float /* desiredScale */) {
- // By default, scaling is not supported.
- return this->getInfo().dimensions();
- }
-
- virtual SkEncodedFormat onGetEncodedFormat() const = 0;
-
virtual bool onReallyHasAlpha() const { return false; }
-
- /**
- * returns true if the image type is hard to sample and must be scaled after reading, not during
- * An example is interlaced pngs, where the entire image must be read for each decode
- */
- virtual bool onRequiresPostYSampling() { return false; }
const SkImageInfo& dstInfo() const { return fDstInfo; }
« no previous file with comments | « include/codec/SkScaledCodec.h ('k') | src/codec/SkBmpStandardCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698