diff options
author | Leon Scroggins III <scroggo@google.com> | 2017-08-15 12:24:02 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-08-17 16:09:31 +0000 |
commit | 0741818e7ab4e9ea8505b8a8687412f0e3804c65 (patch) | |
tree | ac183b3107e97b0717319fd403f6d552fdbd840f /include/codec/SkCodec.h | |
parent | de44c2df9469e70f57f05d262cd1a245b2ff5e90 (diff) |
Move calls to conversion_possible to SkCodec
Move common code into the base class, so subclasses need not call
conversion_possible.
Use SkEncodedInfo rather than SkImageInfo, and use the proper frame.
API Changes:
- SkAndroidCodec:
- Add getEncodedInfo(), for SkBitmapRegionCodec
- SkEncodedInfo:
- Add opaque() helper
- SkBitmapRegionDecoder:
- Remove unused conversionSupported
(Split off from skia-review.googlesource.com/c/25746)
Bug: skia:5601
Change-Id: If4a40d4b98a3dd0afde2b6058f92315a393a5baf
Reviewed-on: https://skia-review.googlesource.com/34361
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Diffstat (limited to 'include/codec/SkCodec.h')
-rw-r--r-- | include/codec/SkCodec.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/codec/SkCodec.h b/include/codec/SkCodec.h index fb4f165dbf..8ec44c8539 100644 --- a/include/codec/SkCodec.h +++ b/include/codec/SkCodec.h @@ -846,6 +846,13 @@ private: bool fStartedIncrementalDecode; /** + * Return whether {srcColor, srcIsOpaque, srcCS} can convert to dst. + * + * Will be called for the appropriate frame, prior to initializing the colorXform. + */ + virtual bool conversionSupported(const SkImageInfo& dst, SkEncodedInfo::Color srcColor, + bool srcIsOpaque, const SkColorSpace* srcCS) const; + /** * Return whether these dimensions are supported as a scale. * * The codec may choose to cache the information about scale and subset. |