aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/codec
diff options
context:
space:
mode:
authorGravatar Leon Scroggins III <scroggo@google.com>2018-01-04 13:26:30 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-04 21:36:04 +0000
commit7397d7ade8b72f3b75e9384693aa59292a63fd68 (patch)
tree58ae0cfad2dddaef2ff79250862ac3aba7a4ce2b /include/codec
parentff889f13392c64b4688acce65cf6079e54981253 (diff)
Add SkAndroidCodec::MakeFromCodec
Bug: b/71578461 Bug: b/63909536 This allows using APIs on SkCodec (e.g. the out-param result on SkCodec::MakeFrom(Stream/Data), getOrigin) when an SkAndroidCodec is ultimately desired without duplicating the APIs on SkAndroidCodec. Change-Id: Ie9803278348acfb3955a795772d6472c15541646 Reviewed-on: https://skia-review.googlesource.com/90844 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
Diffstat (limited to 'include/codec')
-rw-r--r--include/codec/SkAndroidCodec.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/codec/SkAndroidCodec.h b/include/codec/SkAndroidCodec.h
index 0d6cc185d9..e1e2843393 100644
--- a/include/codec/SkAndroidCodec.h
+++ b/include/codec/SkAndroidCodec.h
@@ -20,6 +20,11 @@
class SK_API SkAndroidCodec : SkNoncopyable {
public:
/**
+ * Pass ownership of an SkCodec to a newly-created SkAndroidCodec.
+ */
+ static std::unique_ptr<SkAndroidCodec> MakeFromCodec(std::unique_ptr<SkCodec>);
+
+ /**
* If this stream represents an encoded image that we know how to decode,
* return an SkAndroidCodec that can decode it. Otherwise return NULL.
*