From fa15877f487333bec876e7315cf584c0d598d098 Mon Sep 17 00:00:00 2001 From: Mike Reed Date: Mon, 16 Oct 2017 11:42:53 -0400 Subject: apply codec origin in generator Bug: skia: Change-Id: I383dacb49b1e3c88467ccdbf3288764bb1bbf01a Reviewed-on: https://skia-review.googlesource.com/58600 Reviewed-by: Leon Scroggins Commit-Queue: Mike Reed --- include/codec/SkCodec.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/codec') diff --git a/include/codec/SkCodec.h b/include/codec/SkCodec.h index e2596890f3..6e9c8280b9 100644 --- a/include/codec/SkCodec.h +++ b/include/codec/SkCodec.h @@ -15,6 +15,7 @@ #include "SkEncodedImageFormat.h" #include "SkEncodedInfo.h" #include "SkImageInfo.h" +#include "SkPixmap.h" #include "SkSize.h" #include "SkStream.h" #include "SkTypes.h" @@ -355,6 +356,10 @@ public: return this->getPixels(info, pixels, rowBytes, nullptr); } + Result getPixels(const SkPixmap& pm, const Options* opts = nullptr) { + return this->getPixels(pm.info(), pm.writable_addr(), pm.rowBytes(), opts); + } + /** * If decoding to YUV is supported, this returns true. Otherwise, this * returns false and does not modify any of the parameters. -- cgit v1.2.3