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

Unified Diff: gm/image_pict.cpp

Issue 1352883004: Purge cached resources on SkImage destruction. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: review comments Created 5 years, 3 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 | src/core/SkBitmapProvider.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/image_pict.cpp
diff --git a/gm/image_pict.cpp b/gm/image_pict.cpp
index 216b495dd3580785cb40f19ecf304798404a4e90..19271c1b420b7f9577353fd8f049d6484d78f377 100644
--- a/gm/image_pict.cpp
+++ b/gm/image_pict.cpp
@@ -303,14 +303,15 @@ protected:
static void draw_as_bitmap(SkCanvas* canvas, SkImageCacherator* cache, SkScalar x, SkScalar y) {
SkBitmap bitmap;
- cache->lockAsBitmap(&bitmap);
+ cache->lockAsBitmap(&bitmap, nullptr);
canvas->drawBitmap(bitmap, x, y);
}
static void draw_as_tex(SkCanvas* canvas, SkImageCacherator* cache, SkScalar x, SkScalar y) {
#if SK_SUPPORT_GPU
SkAutoTUnref<GrTexture> texture(cache->lockAsTexture(canvas->getGrContext(),
- kUntiled_SkImageUsageType));
+ kUntiled_SkImageUsageType,
+ nullptr));
if (!texture) {
// show placeholder if we have no texture
SkPaint paint;
« no previous file with comments | « no previous file | src/core/SkBitmapProvider.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698