aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/codec/SkCodec.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/codec/SkCodec.h')
-rw-r--r--include/codec/SkCodec.h5
1 files changed, 5 insertions, 0 deletions
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.