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

Unified Diff: dm/DMSrcSink.h

Issue 1288963002: Provides multiple implementations of Android's SkBitmapRegionDecoder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Response to Leon's comments Created 5 years, 4 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: dm/DMSrcSink.h
diff --git a/dm/DMSrcSink.h b/dm/DMSrcSink.h
index 0aa22a06084fb795b33ee8094e2508b75bb2ca0e..b77c8b406b7ce5d11fa12c824f4fc6c915dd721f 100644
--- a/dm/DMSrcSink.h
+++ b/dm/DMSrcSink.h
@@ -12,6 +12,7 @@
#include "SkBBHFactory.h"
#include "SkBBoxHierarchy.h"
#include "SkBitmap.h"
+#include "SkBitmapRegionDecoder.h"
#include "SkCanvas.h"
#include "SkCodec.h"
#include "SkData.h"
@@ -100,6 +101,28 @@ private:
skiagm::GMRegistry::Factory fFactory;
};
+// Allows for testing of various implementations of Android's BitmapRegionDecoder
+class BRDSrc : public Src {
+public:
+ enum Mode {
+ kFullImage_Mode,
+ kDivisor_Mode,
+ };
+
+ BRDSrc(Path, SkBitmapRegionDecoder::Strategy, Mode, SkColorType, uint32_t);
+
+ Error draw(SkCanvas*) const override;
+ SkISize size() const override;
+ Name name() const override;
+ bool veto(SinkFlags) const override;
+private:
+ Path fPath;
+ SkBitmapRegionDecoder::Strategy fStrategy;
+ Mode fMode;
+ SkColorType fColorType;
+ uint32_t fSampleSize;
+};
+
class CodecSrc : public Src {
public:
enum Mode {
« no previous file with comments | « dm/DM.cpp ('k') | dm/DMSrcSink.cpp » ('j') | src/utils/SkBitmapRegionCanvas.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698