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

Side by Side Diff: src/core/SkGraphics.cpp

Issue 554263005: add PurgeResourceCache to track leaks (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « include/core/SkGraphics.h ('k') | src/core/SkResourceCache.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkGraphics.h" 10 #include "SkGraphics.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 } 121 }
122 SkDebugf("SkGraphics: font cache limit %dK\n", 122 SkDebugf("SkGraphics: font cache limit %dK\n",
123 GetFontCacheLimit() >> 10); 123 GetFontCacheLimit() >> 10);
124 124
125 #endif 125 #endif
126 126
127 } 127 }
128 128
129 void SkGraphics::Term() { 129 void SkGraphics::Term() {
130 PurgeFontCache(); 130 PurgeFontCache();
131 PurgeResourceCache();
131 SkPaint::Term(); 132 SkPaint::Term();
132 } 133 }
133 134
134 /////////////////////////////////////////////////////////////////////////////// 135 ///////////////////////////////////////////////////////////////////////////////
135 136
136 static const char kFontCacheLimitStr[] = "font-cache-limit"; 137 static const char kFontCacheLimitStr[] = "font-cache-limit";
137 static const size_t kFontCacheLimitLen = sizeof(kFontCacheLimitStr) - 1; 138 static const size_t kFontCacheLimitLen = sizeof(kFontCacheLimitStr) - 1;
138 139
139 static const struct { 140 static const struct {
140 const char* fStr; 141 const char* fStr;
(...skipping 30 matching lines...) Expand all
171 if (nextEqual) { 172 if (nextEqual) {
172 val = (size_t) atoi(nextEqual + 1); 173 val = (size_t) atoi(nextEqual + 1);
173 } 174 }
174 (gFlags[i].fFunc)(val); 175 (gFlags[i].fFunc)(val);
175 break; 176 break;
176 } 177 }
177 } 178 }
178 flags = nextSemi + 1; 179 flags = nextSemi + 1;
179 } while (nextSemi); 180 } while (nextSemi);
180 } 181 }
OLDNEW
« no previous file with comments | « include/core/SkGraphics.h ('k') | src/core/SkResourceCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698