| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |