From 1590f3b32890f6455b30494308633177b54db347 Mon Sep 17 00:00:00 2001 From: msarett Date: Mon, 7 Mar 2016 09:16:52 -0800 Subject: Revert of Update Skia's YUV API (patchset #5 id:160001 of https://codereview.chromium.org/1716523002/ ) Reason for revert: Blimp failures with manual roll in Chrome. Original issue's description: > Update Skia's YUV API > > We should match the recently designed API in SkCodec. > https://codereview.chromium.org/1549473003/ > > This requires changes in Chromium as well. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1716523002 > > Committed: https://skia.googlesource.com/skia/+/095d31c8a0eeb5d491febf064bc3c8a44e22b94f TBR=scroggo@google.com,reed@google.com,bsalomon@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1775493002 --- src/lazy/SkDiscardablePixelRef.h | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'src/lazy') diff --git a/src/lazy/SkDiscardablePixelRef.h b/src/lazy/SkDiscardablePixelRef.h index 73a2b08250..695d441d2b 100644 --- a/src/lazy/SkDiscardablePixelRef.h +++ b/src/lazy/SkDiscardablePixelRef.h @@ -54,22 +54,16 @@ private: size_t rowBytes, SkDiscardableMemory::Factory* factory); - bool onQueryYUV8(SkYUVSizeInfo* sizeInfo, SkYUVColorSpace* colorSpace) const override { + bool onGetYUV8Planes(SkISize sizes[3], + void* planes[3], + size_t rowBytes[3], + SkYUVColorSpace* colorSpace) override { // If the image was already decoded with lockPixels(), favor not // re-decoding to YUV8 planes. if (fDiscardableMemory) { return false; } - 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); + return fGenerator->getYUV8Planes(sizes, planes, rowBytes, colorSpace); } friend bool SkDEPRECATED_InstallDiscardablePixelRef(SkImageGenerator*, const SkIRect*, SkBitmap*, -- cgit v1.2.3