From 7397d7ade8b72f3b75e9384693aa59292a63fd68 Mon Sep 17 00:00:00 2001 From: Leon Scroggins III Date: Thu, 4 Jan 2018 13:26:30 -0500 Subject: 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 Commit-Queue: Leon Scroggins --- include/codec/SkAndroidCodec.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/codec') 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 @@ -19,6 +19,11 @@ */ class SK_API SkAndroidCodec : SkNoncopyable { public: + /** + * Pass ownership of an SkCodec to a newly-created SkAndroidCodec. + */ + static std::unique_ptr MakeFromCodec(std::unique_ptr); + /** * If this stream represents an encoded image that we know how to decode, * return an SkAndroidCodec that can decode it. Otherwise return NULL. -- cgit v1.2.3