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

Unified Diff: src/lazy/SkDiscardablePixelRef.cpp

Issue 83563002: Implement SkAshmemDiscardableMemory (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: bugfix Created 7 years, 1 month 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
Index: src/lazy/SkDiscardablePixelRef.cpp
diff --git a/src/lazy/SkDiscardablePixelRef.cpp b/src/lazy/SkDiscardablePixelRef.cpp
index b6e1b1004ed7096fc180be5945aa44e5dfab1c1c..026186a114de6d94c8a8a7abdcb9decab6acf0e0 100644
--- a/src/lazy/SkDiscardablePixelRef.cpp
+++ b/src/lazy/SkDiscardablePixelRef.cpp
@@ -31,6 +31,7 @@ void* SkDiscardablePixelRef::onLockPixels(SkColorTable**) {
if (fDiscardableMemory->lock()) {
return fDiscardableMemory->data();
}
+ SkDELETE(fDiscardableMemory);
fDiscardableMemory = NULL;
}
fDiscardableMemory = SkDiscardableMemory::Create(fSize);

Powered by Google App Engine
This is Rietveld 408576698