SkDiscardablePixelRef should favor not decoding to YUV if they already decoded to RGB.

BUG=skia:
BUG=459760

Review URL: https://codereview.chromium.org/944823004
This commit is contained in:
vmiura 2015-02-23 10:59:44 -08:00 committed by Commit bot
parent 93276c683d
commit 278f86e4df

View File

@ -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);
}