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

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: Use nullptr instead of NULL 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 82a07258a8d785ac3e821e5568f4b55eec0d8581..20bc8450880ce8abe4899356bb4e68da7bd3b661 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 "SkData.h"
#include "SkGPipe.h"
@@ -99,6 +100,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,
scroggo 2015/09/01 22:05:28 Maybe add some comments explaining what these mean
msarett 2015/09/02 18:02:23 Yes that would be helpful. Done.
+ 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 {

Powered by Google App Engine
This is Rietveld 408576698