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

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: 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
Index: src/codec/SkBmpCodec.h
diff --git a/src/codec/SkBmpCodec.h b/src/codec/SkBmpCodec.h
index d76b0c41cf6a670c73056e59549a0dad2c217967..ecd45ae62fcbc0e16a6615ae7a2859c7992ef71b 100644
--- a/src/codec/SkBmpCodec.h
+++ b/src/codec/SkBmpCodec.h
@@ -90,6 +90,12 @@ protected:
* Accessors used by subclasses
*/
uint16_t bitsPerPixel() const { return fBitsPerPixel; }
+
+ int subsetLeft() const { return fSubsetLeft; }
+ int subsetWidth() const {return fSubsetWidth; }
msarett 2015/10/02 14:49:15 I need to rename this. This is different from the
+
+private:
+
SkScanlineOrder onGetScanlineOrder() const override { return fRowOrder; }
/*
@@ -111,8 +117,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
@@ -138,13 +142,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;

Powered by Google App Engine
This is Rietveld 408576698