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

Unified Diff: src/codec/SkBmpCodec.h

Issue 1321433002: Add subsetting to SkScaledCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@gif-scan
Patch Set: Rebase - it compiles but I'm sure everything is broken Created 5 years, 2 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/SkBmpCodec.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkBmpCodec.h
diff --git a/src/codec/SkBmpCodec.h b/src/codec/SkBmpCodec.h
index 65662ff1f869df3a655799f93e73598ed57a4a6a..7da396ca8cb828cce9d8df0dac29d51bebecb314 100644
--- a/src/codec/SkBmpCodec.h
+++ b/src/codec/SkBmpCodec.h
@@ -89,6 +89,12 @@ protected:
* Accessors used by subclasses
*/
uint16_t bitsPerPixel() const { return fBitsPerPixel; }
+
+ int subsetLeft() const { return fSubsetLeft; }
+ int subsetWidth() const {return fSubsetWidth; }
+
+private:
+
SkScanlineOrder onGetScanlineOrder() const override { return fRowOrder; }
/*
@@ -110,8 +116,6 @@ protected:
const SkCodec::Options& options, SkPMColor inputColorPtr[],
int* inputColorCount) = 0;
-private:
-
/*
* Creates a bmp decoder
* Reads enough of the stream to determine the image format
@@ -137,13 +141,16 @@ private:
const Options& opts) = 0;
Result onStartScanlineDecode(const SkImageInfo& dstInfo, const SkCodec::Options&,
- SkPMColor inputColorPtr[], int* inputColorCount) override;
+ SkPMColor inputColorPtr[], int* inputColorCount, int subsetLeft, int subsetWidth)
+ override;
int onGetScanlines(void* dst, int count, size_t rowBytes) override;
// TODO(msarett): Override default skipping with something more clever.
const uint16_t fBitsPerPixel;
+ int fSubsetLeft;
+ int fSubsetWidth;
const SkScanlineOrder fRowOrder;
typedef SkCodec INHERITED;
« no previous file with comments | « include/codec/SkScaledCodec.h ('k') | src/codec/SkBmpCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698