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

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

Issue 2228953002: Purge the SkLiteDL freelist when PurgeAllCaches() is called. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: stray static 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/core/SkLiteDL.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 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #include "SkGraphics.h" 9 #include "SkGraphics.h"
10 10
11 #include "SkBlitter.h" 11 #include "SkBlitter.h"
12 #include "SkCanvas.h" 12 #include "SkCanvas.h"
13 #include "SkCpu.h" 13 #include "SkCpu.h"
14 #include "SkGeometry.h" 14 #include "SkGeometry.h"
15 #include "SkGlyphCache.h" 15 #include "SkGlyphCache.h"
16 #include "SkImageFilter.h" 16 #include "SkImageFilter.h"
17 #include "SkLiteDL.h"
17 #include "SkMath.h" 18 #include "SkMath.h"
18 #include "SkMatrix.h" 19 #include "SkMatrix.h"
19 #include "SkOpts.h" 20 #include "SkOpts.h"
20 #include "SkPath.h" 21 #include "SkPath.h"
21 #include "SkPathEffect.h" 22 #include "SkPathEffect.h"
22 #include "SkPixelRef.h" 23 #include "SkPixelRef.h"
23 #include "SkRefCnt.h" 24 #include "SkRefCnt.h"
24 #include "SkResourceCache.h" 25 #include "SkResourceCache.h"
25 #include "SkScalerContext.h" 26 #include "SkScalerContext.h"
26 #include "SkShader.h" 27 #include "SkShader.h"
(...skipping 27 matching lines...) Expand all
54 55
55 void SkGraphics::DumpMemoryStatistics(SkTraceMemoryDump* dump) { 56 void SkGraphics::DumpMemoryStatistics(SkTraceMemoryDump* dump) {
56 SkResourceCache::DumpMemoryStatistics(dump); 57 SkResourceCache::DumpMemoryStatistics(dump);
57 SkGlyphCache::DumpMemoryStatistics(dump); 58 SkGlyphCache::DumpMemoryStatistics(dump);
58 } 59 }
59 60
60 void SkGraphics::PurgeAllCaches() { 61 void SkGraphics::PurgeAllCaches() {
61 SkGraphics::PurgeFontCache(); 62 SkGraphics::PurgeFontCache();
62 SkGraphics::PurgeResourceCache(); 63 SkGraphics::PurgeResourceCache();
63 SkImageFilter::PurgeCache(); 64 SkImageFilter::PurgeCache();
65 SkLiteDL::PurgeFreelist();
64 } 66 }
65 67
66 /////////////////////////////////////////////////////////////////////////////// 68 ///////////////////////////////////////////////////////////////////////////////
67 69
68 static const char kFontCacheLimitStr[] = "font-cache-limit"; 70 static const char kFontCacheLimitStr[] = "font-cache-limit";
69 static const size_t kFontCacheLimitLen = sizeof(kFontCacheLimitStr) - 1; 71 static const size_t kFontCacheLimitLen = sizeof(kFontCacheLimitStr) - 1;
70 72
71 static const struct { 73 static const struct {
72 const char* fStr; 74 const char* fStr;
73 size_t fLen; 75 size_t fLen;
(...skipping 29 matching lines...) Expand all
103 if (nextEqual) { 105 if (nextEqual) {
104 val = (size_t) atoi(nextEqual + 1); 106 val = (size_t) atoi(nextEqual + 1);
105 } 107 }
106 (gFlags[i].fFunc)(val); 108 (gFlags[i].fFunc)(val);
107 break; 109 break;
108 } 110 }
109 } 111 }
110 flags = nextSemi + 1; 112 flags = nextSemi + 1;
111 } while (nextSemi); 113 } while (nextSemi);
112 } 114 }
OLDNEW
« no previous file with comments | « no previous file | src/core/SkLiteDL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698