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