Avoid caching resources for volatile bitmap shaders
SkBitmapProvider::isVolatile() treats all SkImages as non-volatile, which is not what we want for temp SkImage wrappers of volatile bitmaps. R=reed@google.com BUG=chromium:633941 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2222783002 Review-Url: https://codereview.chromium.org/2222783002
This commit is contained in:
parent
f21cd16228
commit
5d2befe006
@ -49,7 +49,9 @@ SkImageInfo SkBitmapProvider::info() const {
|
||||
|
||||
bool SkBitmapProvider::isVolatile() const {
|
||||
if (fImage) {
|
||||
return false; // add flag to images?
|
||||
// add flag to images?
|
||||
const SkBitmap* bm = as_IB(fImage)->onPeekBitmap();
|
||||
return bm ? bm->isVolatile() : false;
|
||||
} else {
|
||||
return fBitmap.isVolatile();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user