Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Unified Diff: src/core/SkBitmapProvider.cpp

Issue 2222783002: Avoid caching resources for volatile bitmap shaders (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapProvider.cpp
diff --git a/src/core/SkBitmapProvider.cpp b/src/core/SkBitmapProvider.cpp
index dd34fb04abce726e85ed873815c209040287d9aa..37f8dc9d52e9de111634ce18eab0426cc47a6692 100644
--- a/src/core/SkBitmapProvider.cpp
+++ b/src/core/SkBitmapProvider.cpp
@@ -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();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698