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

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

Issue 1903503002: Remove static initializer for SkOpts::Init() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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 | « src/core/SkOpts.h ('k') | tools/skiaserve/skiaserve.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 2015 Google Inc. 2 * Copyright 2015 Google Inc.
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 #include "SkHalf.h" 8 #include "SkHalf.h"
9 #include "SkOnce.h" 9 #include "SkOnce.h"
10 #include "SkOpts.h" 10 #include "SkOpts.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 defined(SK_BUILD_FOR_ANDROID) && \ 134 defined(SK_BUILD_FOR_ANDROID) && \
135 !defined(SK_BUILD_FOR_ANDROID_FRAMEWORK) 135 !defined(SK_BUILD_FOR_ANDROID_FRAMEWORK)
136 if (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) { Init_neon (); } 136 if (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) { Init_neon (); }
137 #endif 137 #endif
138 } 138 }
139 139
140 void Init() { 140 void Init() {
141 static SkOnce once; 141 static SkOnce once;
142 once(init); 142 once(init);
143 } 143 }
144 144 } // namespace SkOpts
145 #if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS
146 static struct AutoInit {
147 AutoInit() { Init(); }
148 } gAutoInit;
149 #endif
150 }
OLDNEW
« no previous file with comments | « src/core/SkOpts.h ('k') | tools/skiaserve/skiaserve.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698