diff options
author | Leon Scroggins III <scroggo@google.com> | 2017-10-30 09:07:53 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-11-03 15:29:34 +0000 |
commit | 0cbc10f94e2b350761e64b225c97390269f41479 (patch) | |
tree | a3dd274a32583b289af7fb930ce44a6eec001599 /dm/DMSrcSink.cpp | |
parent | 60aaeb2b551d5e3e90baacac315e899e26f758f1 (diff) |
Make SkImageGeneratorCG apply encoded origin
SkImageGeneratorCG:
- Detect the origin and apply it to the output
- Deprecate NewFromEncodedCG and add MakeFromEncodedCG
SkCodecImageGenerator:
- Move code elsewhere for sharing
- Apply origin for incomplete decodes
SkPixmap.cpp/SkPixmapPriv.h:
- Now has the shared code for generators to apply origin
DMSrcSink.cpp:
- Call MakeFromEncodedCG
SkCGUtils.h:
- Add a version of SkCopyPixelsFromCGImage that takes an SkPixmap
Bug: skia:7138
Bug: skia:3834
Change-Id: Ic6dbc76360c6a84913b67373582f328d3946d637
Reviewed-on: https://skia-review.googlesource.com/63740
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Diffstat (limited to 'dm/DMSrcSink.cpp')
-rw-r--r-- | dm/DMSrcSink.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp index 6af90c3a47..fc535dcd59 100644 --- a/dm/DMSrcSink.cpp +++ b/dm/DMSrcSink.cpp @@ -942,7 +942,7 @@ Error ImageGenSrc::draw(SkCanvas* canvas) const { break; case kPlatform_Mode: { #if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS) - gen.reset(SkImageGeneratorCG::NewFromEncodedCG(encoded.get())); + gen = SkImageGeneratorCG::MakeFromEncodedCG(encoded); #elif defined(SK_BUILD_FOR_WIN) gen.reset(SkImageGeneratorWIC::NewFromEncodedWIC(encoded.get())); #endif |