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:
parent
93276c683d
commit
278f86e4df
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user