projects
/
platform
/
upstream
/
libSkiaSharp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
93276c6
)
SkDiscardablePixelRef should favor not decoding to YUV if they already decoded to...
author
vmiura
<vmiura@chromium.org>
Mon, 23 Feb 2015 18:59:44 +0000
(10:59 -0800)
committer
Commit bot
<commit-bot@chromium.org>
Mon, 23 Feb 2015 18:59:44 +0000
(10:59 -0800)
BUG=skia:
BUG=459760
Review URL: https://codereview.chromium.org/
944823004
src/lazy/SkDiscardablePixelRef.h
patch
|
blob
|
history
diff --git
a/src/lazy/SkDiscardablePixelRef.h
b/src/lazy/SkDiscardablePixelRef.h
index
38ff2c4
..
9fef055
100644
(file)
--- 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);
}