Chromium Code Reviews| Index: src/lazy/SkDiscardablePixelRef.h |
| diff --git a/src/lazy/SkDiscardablePixelRef.h b/src/lazy/SkDiscardablePixelRef.h |
| index 448f0ab24b907c1fe7b3ce1e49146905e30f0cd3..d4d104567d3809325613fdc0b3ff45bd2d1c0990 100644 |
| --- a/src/lazy/SkDiscardablePixelRef.h |
| +++ b/src/lazy/SkDiscardablePixelRef.h |
| @@ -52,6 +52,10 @@ 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) |
|
bsalomon
2015/02/20 22:24:44
tiny style nits, we always us {} and indents are (
|
| + return false; |
| return fGenerator->getYUV8Planes(sizes, planes, rowBytes, colorSpace); |
| } |