aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm/DMSrcSink.h
diff options
context:
space:
mode:
authorGravatar msarett <msarett@google.com>2016-03-09 14:20:58 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-09 14:20:58 -0800
commit1897631ebe417631ea7a046a2eb0995ab9d04539 (patch)
tree766fb1f25096283de72e39d0754f434525b5683e /dm/DMSrcSink.h
parentbeba90864ae4645b9f4f7a47065f567862ada12c (diff)
Add an SkImageGeneratorCG
This will serve as a replacement for SkImageDecoder_CG. BUG=skia:4914 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1718273004 Review URL: https://codereview.chromium.org/1718273004
Diffstat (limited to 'dm/DMSrcSink.h')
-rw-r--r--dm/DMSrcSink.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/dm/DMSrcSink.h b/dm/DMSrcSink.h
index 638d13824a..b6ee5f09d7 100644
--- a/dm/DMSrcSink.h
+++ b/dm/DMSrcSink.h
@@ -112,7 +112,6 @@ public:
kStripe_Mode, // Tests the skipping of scanlines
kCroppedScanline_Mode, // Tests (jpeg) cropped scanline optimization
kSubset_Mode, // For codecs that support subsets directly.
- kGen_Mode, // Test SkCodecImageGenerator (includes YUV)
};
enum DstColorType {
kGetFromCanvas_DstColorType,
@@ -187,6 +186,27 @@ private:
uint32_t fSampleSize;
};
+class ImageGenSrc : public Src {
+public:
+ enum Mode {
+ kCodec_Mode, // Use CodecImageGenerator
+ kPlatform_Mode, // Uses CG or WIC
+ };
+ ImageGenSrc(Path, Mode, SkAlphaType, bool);
+
+ Error draw(SkCanvas*) const override;
+ SkISize size() const override;
+ Name name() const override;
+ bool veto(SinkFlags) const override;
+ bool serial() const override { return fRunSerially; }
+private:
+ Path fPath;
+ Mode fMode;
+ SkAlphaType fDstAlphaType;
+ bool fIsGpu;
+ bool fRunSerially;
+};
+
class SKPSrc : public Src {
public:
explicit SKPSrc(Path path);