Various improvements to CodecSrc testing in dm
*** Add CodecMode and ScaledCodecMode (in place of
NormalMode), so now we test SkCodec's getPixels() and
SkScaledCodec's getPixels()
*** Don't attempt to test scanline and codec modes using
the dimensions that were recommended for SkScaledCodec.
*** Change tags so that each scale gets its own output
folder.
TODO: Make ScanlineMode and ScanlineSubsetMode support
kOutOfOrder etc. I think this belongs with the gif CL -
I don't want to add test modes that we don't run yet.
BUG=skia:4202
BUG=skia:4238
Review URL: https://codereview.chromium.org/1327433003
diff --git a/dm/DMSrcSink.h b/dm/DMSrcSink.h
index e5f22f8..efae871 100644
--- a/dm/DMSrcSink.h
+++ b/dm/DMSrcSink.h
@@ -24,6 +24,7 @@
struct ImplicitString : public SkString {
template <typename T>
ImplicitString(const T& s) : SkString(s) {}
+ ImplicitString() : SkString("") {}
};
typedef ImplicitString Name;
typedef ImplicitString Path;
@@ -102,7 +103,8 @@
class CodecSrc : public Src {
public:
enum Mode {
- kNormal_Mode,
+ kScaledCodec_Mode,
+ kCodec_Mode,
kScanline_Mode,
kScanline_Subset_Mode,
kStripe_Mode, // Tests the skipping of scanlines
@@ -120,10 +122,10 @@
Name name() const override;
bool veto(SinkFlags) const override;
private:
- Path fPath;
- Mode fMode;
- DstColorType fDstColorType;
- float fScale;
+ Path fPath;
+ Mode fMode;
+ DstColorType fDstColorType;
+ float fScale;
};