Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 42 #define typesizeline(type) { #type , sizeof(type) } | 42 #define typesizeline(type) { #type , sizeof(type) } |
| 43 | 43 |
| 44 #ifdef BUILD_EMBOSS_TABLE | 44 #ifdef BUILD_EMBOSS_TABLE |
| 45 extern void SkEmbossMask_BuildTable(); | 45 extern void SkEmbossMask_BuildTable(); |
| 46 #endif | 46 #endif |
| 47 | 47 |
| 48 #ifdef BUILD_RADIALGRADIENT_TABLE | 48 #ifdef BUILD_RADIALGRADIENT_TABLE |
| 49 extern void SkRadialGradient_BuildTable(); | 49 extern void SkRadialGradient_BuildTable(); |
| 50 #endif | 50 #endif |
| 51 | 51 |
| 52 #ifdef SK_BUILD_FOR_ANDROID | |
| 53 extern void AndroidSkDebugToStdOut(bool debugToStdOut); | |
| 54 #endif | |
| 55 | |
| 52 void SkGraphics::Init() { | 56 void SkGraphics::Init() { |
| 53 #ifdef SK_DEVELOPER | 57 #ifdef SK_DEVELOPER |
| 54 skRTConfRegistry().possiblyDumpFile(); | 58 skRTConfRegistry().possiblyDumpFile(); |
| 55 skRTConfRegistry().validate(); | 59 skRTConfRegistry().validate(); |
| 56 if (skRTConfRegistry().hasNonDefault()) { | 60 if (skRTConfRegistry().hasNonDefault()) { |
| 57 SkDebugf("Non-default runtime configuration options:\n"); | 61 SkDebugf("Non-default runtime configuration options:\n"); |
| 58 skRTConfRegistry().printNonDefault(); | 62 skRTConfRegistry().printNonDefault(); |
| 59 } | 63 } |
| 60 #endif | 64 #endif |
| 61 | 65 |
| 62 #ifdef BUILD_EMBOSS_TABLE | 66 #ifdef BUILD_EMBOSS_TABLE |
| 63 SkEmbossMask_BuildTable(); | 67 SkEmbossMask_BuildTable(); |
| 64 #endif | 68 #endif |
| 65 #ifdef BUILD_RADIALGRADIENT_TABLE | 69 #ifdef BUILD_RADIALGRADIENT_TABLE |
| 66 SkRadialGradient_BuildTable(); | 70 SkRadialGradient_BuildTable(); |
| 67 #endif | 71 #endif |
| 68 | 72 |
| 73 #ifdef SK_BUILD_FOR_ANDROID | |
| 74 AndroidSkDebugToStdOut(true); | |
|
scroggo
2014/12/10 17:02:41
We can also set this back to false in Term(). (Thi
| |
| 75 #endif | |
| 76 | |
| 69 #ifdef SK_DEBUGx | 77 #ifdef SK_DEBUGx |
| 70 int i; | 78 int i; |
| 71 | 79 |
| 72 static const struct { | 80 static const struct { |
| 73 const char* fTypeName; | 81 const char* fTypeName; |
| 74 size_t fSizeOf; | 82 size_t fSizeOf; |
| 75 } gTypeSize[] = { | 83 } gTypeSize[] = { |
| 76 typesizeline(char), | 84 typesizeline(char), |
| 77 typesizeline(short), | 85 typesizeline(short), |
| 78 typesizeline(int), | 86 typesizeline(int), |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 171 if (nextEqual) { | 179 if (nextEqual) { |
| 172 val = (size_t) atoi(nextEqual + 1); | 180 val = (size_t) atoi(nextEqual + 1); |
| 173 } | 181 } |
| 174 (gFlags[i].fFunc)(val); | 182 (gFlags[i].fFunc)(val); |
| 175 break; | 183 break; |
| 176 } | 184 } |
| 177 } | 185 } |
| 178 flags = nextSemi + 1; | 186 flags = nextSemi + 1; |
| 179 } while (nextSemi); | 187 } while (nextSemi); |
| 180 } | 188 } |
| OLD | NEW |