diff options
author | msarett <msarett@google.com> | 2015-04-09 12:43:10 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-09 12:43:10 -0700 |
commit | 438b2adefb9e9213e0ddaf0609405d3087a1cf0a (patch) | |
tree | 34b6c116c074d5f24f8e37a45db0e8404de8d83f /dm/DMSrcSink.h | |
parent | 16b254a200f63e85041cac9a283ff0ff14d94ba1 (diff) |
***Disables swizzles to 565.
We may want to enable swizzles to 565
for images that are encoded in a format
similar to 565, however, we do not want
to take images that decode naturally to
kN32 and then convert them to 565.
***Enable swizzles to kIndex_8. For images
encoded in a color table format, we suggest
that they be decoded to kIndex_8. When we
decode, we only allow conversion to kIndex_8
if it matches the suggested color type (except
wbmp which seems good as is).
***Modify dm to test images that decode to
kIndex_8.
BUG=skia:3257
BUG=skia:3440
Review URL: https://codereview.chromium.org/1055743003
Diffstat (limited to 'dm/DMSrcSink.h')
-rw-r--r-- | dm/DMSrcSink.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/dm/DMSrcSink.h b/dm/DMSrcSink.h index 57af911062..0807cb6644 100644 --- a/dm/DMSrcSink.h +++ b/dm/DMSrcSink.h @@ -13,6 +13,7 @@ #include "SkBBoxHierarchy.h" #include "SkBitmap.h" #include "SkCanvas.h" +#include "SkCodec.h" #include "SkData.h" #include "SkGPipe.h" #include "SkPicture.h" @@ -94,14 +95,20 @@ public: kNormal_Mode, kScanline_Mode, }; - CodecSrc(Path, Mode); + enum DstColorType { + kGetFromCanvas_DstColorType, + kIndex8_Always_DstColorType, + kGrayscale_Always_DstColorType, + }; + CodecSrc(Path, Mode, DstColorType); Error draw(SkCanvas*) const override; SkISize size() const override; Name name() const override; private: - Path fPath; - Mode fMode; + Path fPath; + Mode fMode; + DstColorType fDstColorType; }; |