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

Unified Diff: dm/DMSrcSink.h

Issue 1406223002: Create an SkAndroidCodec API separate from SkCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Response to comments 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 | « dm/DM.cpp ('k') | dm/DMSrcSink.cpp » ('j') | dm/DMSrcSink.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMSrcSink.h
diff --git a/dm/DMSrcSink.h b/dm/DMSrcSink.h
index 1beaec9a697f3e9c2a34816e0477dfd38843a50d..e055d74a82057cac28d7ade6886535104a072aef 100644
--- a/dm/DMSrcSink.h
+++ b/dm/DMSrcSink.h
@@ -104,7 +104,6 @@ private:
class CodecSrc : public Src {
public:
enum Mode {
- kScaledCodec_Mode,
kCodec_Mode,
kScanline_Mode,
kScanline_Subset_Mode,
@@ -129,6 +128,28 @@ private:
float fScale;
};
+class AndroidCodecSrc : public Src {
+public:
+ enum Mode {
+ kFullImage_Mode,
+ // Splits the image into multiple subsets using a divisor and decodes the subsets
+ // separately.
+ kDivisor_Mode,
+ };
+
+ AndroidCodecSrc(Path, Mode, CodecSrc::DstColorType, int);
scroggo 2015/10/20 13:51:59 Can you add /* sampleSize */ to int here? (I *thin
msarett 2015/10/20 14:47:27 Yes!
+
+ Error draw(SkCanvas*) const override;
+ SkISize size() const override;
+ Name name() const override;
+ bool veto(SinkFlags) const override;
+private:
+ Path fPath;
+ Mode fMode;
+ CodecSrc::DstColorType fDstColorType;
+ int fSampleSize;
+};
+
// Allows for testing of various implementations of Android's BitmapRegionDecoder
class BRDSrc : public Src {
public:
« no previous file with comments | « dm/DM.cpp ('k') | dm/DMSrcSink.cpp » ('j') | dm/DMSrcSink.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698