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

Unified Diff: dm/DMSrcSink.h

Issue 1718273004: Add an SkImageGeneratorCG (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 80 chars Created 4 years, 9 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 638d13824a55c2738eb8df941a5909ea1fdb242a..b6ee5f09d7cbebabccaaf1e83d54d89301ab9423 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);
« 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