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

Unified Diff: src/gpu/GrPictureUtils.h

Issue 265763008: Fix memory leak in GPU Picture optimization (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 7 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/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrPictureUtils.h
===================================================================
--- src/gpu/GrPictureUtils.h (revision 14586)
+++ src/gpu/GrPictureUtils.h (working copy)
@@ -45,6 +45,12 @@
GPUAccelData(Key key) : INHERITED(key) { }
+ virtual ~GPUAccelData() {
+ for (int i = 0; i < fSaveLayerInfo.count(); ++i) {
+ SkDELETE(fSaveLayerInfo[i].fPaint);
+ }
+ }
+
void addSaveLayerInfo(const SaveLayerInfo& info) {
SkASSERT(info.fSaveLayerOpID < info.fRestoreOpID);
*fSaveLayerInfo.push() = info;
« no previous file with comments | « no previous file | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698