aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/lazy
diff options
context:
space:
mode:
authorGravatar msarett <msarett@google.com>2016-03-10 05:44:43 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-10 05:44:43 -0800
commit4984c3c95f18eda44492a2126c9958e447f2cca8 (patch)
treeadd5bdca2495968a8acc1affd10e5cfe225ff4d0 /src/lazy
parentd6215cf4a5f416cf0b64a4fbba95c519f03fe467 (diff)
Update Skia's YUV API
Diffstat (limited to 'src/lazy')
-rw-r--r--src/lazy/SkDiscardablePixelRef.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/lazy/SkDiscardablePixelRef.h b/src/lazy/SkDiscardablePixelRef.h
index 695d441d2b..73a2b08250 100644
--- a/src/lazy/SkDiscardablePixelRef.h
+++ b/src/lazy/SkDiscardablePixelRef.h
@@ -54,16 +54,22 @@ private:
size_t rowBytes,
SkDiscardableMemory::Factory* factory);
- bool onGetYUV8Planes(SkISize sizes[3],
- void* planes[3],
- size_t rowBytes[3],
- SkYUVColorSpace* colorSpace) override {
+ bool onQueryYUV8(SkYUVSizeInfo* sizeInfo, SkYUVColorSpace* colorSpace) const override {
// If the image was already decoded with lockPixels(), favor not
// re-decoding to YUV8 planes.
if (fDiscardableMemory) {
return false;
}
- return fGenerator->getYUV8Planes(sizes, planes, rowBytes, colorSpace);
+ return fGenerator->queryYUV8(sizeInfo, colorSpace);
+ }
+
+ bool onGetYUV8Planes(const SkYUVSizeInfo& sizeInfo, void* planes[3]) override {
+ // If the image was already decoded with lockPixels(), favor not
+ // re-decoding to YUV8 planes.
+ if (fDiscardableMemory) {
+ return false;
+ }
+ return fGenerator->getYUV8Planes(sizeInfo, planes);
}
friend bool SkDEPRECATED_InstallDiscardablePixelRef(SkImageGenerator*, const SkIRect*, SkBitmap*,