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

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: Win bot fix 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') | no next file with comments »
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..a7cca8396a3de338300eb264c2e9a62d33ccd0d8 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 sampleSize);
+
+ 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698