diff options
Diffstat (limited to 'src/lazy/SkDiscardablePixelRef.h')
-rw-r--r-- | src/lazy/SkDiscardablePixelRef.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lazy/SkDiscardablePixelRef.h b/src/lazy/SkDiscardablePixelRef.h index 38ff2c4703..9fef0559d0 100644 --- a/src/lazy/SkDiscardablePixelRef.h +++ b/src/lazy/SkDiscardablePixelRef.h @@ -53,6 +53,11 @@ private: void* planes[3], size_t rowBytes[3], SkYUVColorSpace* colorSpace) SK_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); } |