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

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

Issue 2215433003: Revert of SkRTConf: reduce functionality to what we use, increase simplicity (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « site/dev/runtime/index.md ('k') | src/effects/SkBlurMaskFilter.cpp » ('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 "SkMath.h" 17 #include "SkMath.h"
18 #include "SkMatrix.h" 18 #include "SkMatrix.h"
19 #include "SkOpts.h" 19 #include "SkOpts.h"
20 #include "SkPath.h" 20 #include "SkPath.h"
21 #include "SkPathEffect.h" 21 #include "SkPathEffect.h"
22 #include "SkPixelRef.h" 22 #include "SkPixelRef.h"
23 #include "SkRefCnt.h" 23 #include "SkRefCnt.h"
24 #include "SkResourceCache.h" 24 #include "SkResourceCache.h"
25 #include "SkRTConf.h"
25 #include "SkScalerContext.h" 26 #include "SkScalerContext.h"
26 #include "SkShader.h" 27 #include "SkShader.h"
27 #include "SkStream.h" 28 #include "SkStream.h"
28 #include "SkTSearch.h" 29 #include "SkTSearch.h"
29 #include "SkTime.h" 30 #include "SkTime.h"
30 #include "SkUtils.h" 31 #include "SkUtils.h"
31 #include "SkXfermode.h" 32 #include "SkXfermode.h"
32 33
33 #include <stdlib.h> 34 #include <stdlib.h>
34 35
35 void SkGraphics::GetVersion(int32_t* major, int32_t* minor, int32_t* patch) { 36 void SkGraphics::GetVersion(int32_t* major, int32_t* minor, int32_t* patch) {
36 if (major) { 37 if (major) {
37 *major = SKIA_VERSION_MAJOR; 38 *major = SKIA_VERSION_MAJOR;
38 } 39 }
39 if (minor) { 40 if (minor) {
40 *minor = SKIA_VERSION_MINOR; 41 *minor = SKIA_VERSION_MINOR;
41 } 42 }
42 if (patch) { 43 if (patch) {
43 *patch = SKIA_VERSION_PATCH; 44 *patch = SKIA_VERSION_PATCH;
44 } 45 }
45 } 46 }
46 47
47 void SkGraphics::Init() { 48 void SkGraphics::Init() {
48 // SkGraphics::Init() must be thread-safe and idempotent. 49 // SkGraphics::Init() must be thread-safe and idempotent.
49 SkCpu::CacheRuntimeFeatures(); 50 SkCpu::CacheRuntimeFeatures();
50 SkOpts::Init(); 51 SkOpts::Init();
52
53 #ifdef SK_DEBUG
54 skRTConfRegistry().possiblyDumpFile();
55 skRTConfRegistry().validate();
56 if (skRTConfRegistry().hasNonDefault()) {
57 SkDebugf("Non-default runtime configuration options:\n");
58 skRTConfRegistry().printNonDefault();
59 }
60 #endif
51 } 61 }
52 62
53 /////////////////////////////////////////////////////////////////////////////// 63 ///////////////////////////////////////////////////////////////////////////////
54 64
55 void SkGraphics::DumpMemoryStatistics(SkTraceMemoryDump* dump) { 65 void SkGraphics::DumpMemoryStatistics(SkTraceMemoryDump* dump) {
56 SkResourceCache::DumpMemoryStatistics(dump); 66 SkResourceCache::DumpMemoryStatistics(dump);
57 SkGlyphCache::DumpMemoryStatistics(dump); 67 SkGlyphCache::DumpMemoryStatistics(dump);
58 } 68 }
59 69
60 void SkGraphics::PurgeAllCaches() { 70 void SkGraphics::PurgeAllCaches() {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 if (nextEqual) { 113 if (nextEqual) {
104 val = (size_t) atoi(nextEqual + 1); 114 val = (size_t) atoi(nextEqual + 1);
105 } 115 }
106 (gFlags[i].fFunc)(val); 116 (gFlags[i].fFunc)(val);
107 break; 117 break;
108 } 118 }
109 } 119 }
110 flags = nextSemi + 1; 120 flags = nextSemi + 1;
111 } while (nextSemi); 121 } while (nextSemi);
112 } 122 }
OLDNEW
« no previous file with comments | « site/dev/runtime/index.md ('k') | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698