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

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

Issue 1894893002: Modernize and trim down SkOnce. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: might as well class 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
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 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 "SkBitmapProcShader.h" 8 #include "SkBitmapProcShader.h"
9 #include "SkColorFilter.h" 9 #include "SkColorFilter.h"
10 #include "SkColorFilterShader.h" 10 #include "SkColorFilterShader.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // ColorFilter 46 // ColorFilter
47 SkColorFilter::InitializeFlattenables(); 47 SkColorFilter::InitializeFlattenables();
48 48
49 // Xfermode 49 // Xfermode
50 SkXfermode::InitializeFlattenables(); 50 SkXfermode::InitializeFlattenables();
51 51
52 // Now initialize any optional/additional effects (implemented in src/ports) 52 // Now initialize any optional/additional effects (implemented in src/ports)
53 InitEffects(); 53 InitEffects();
54 }; 54 };
55 55
56 SK_DECLARE_STATIC_ONCE(once);
57 void SkFlattenable::InitializeFlattenablesIfNeeded() { 56 void SkFlattenable::InitializeFlattenablesIfNeeded() {
58 SkOnce(&once, SkFlattenable::PrivateInitializer::InitCore); 57 static SkOnce once;
58 once(SkFlattenable::PrivateInitializer::InitCore);
59 } 59 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698