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

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

Issue 1580873002: reorg global initialization, separating core from optional (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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 | « include/core/SkFlattenable.h ('k') | src/ports/SkGlobalInitialization_chromium.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2016 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #include "SkBitmapProcShader.h"
9 #include "SkColorFilter.h"
10 #include "SkColorFilterShader.h"
11 #include "SkColorShader.h"
12 #include "SkComposeShader.h"
13 #include "SkEmptyShader.h"
14 #include "SkFlattenable.h"
15 #include "SkImageShader.h"
16 #include "SkLocalMatrixShader.h"
17 #include "SkOnce.h"
18 #include "SkPathEffect.h"
19 #include "SkPictureShader.h"
20 #include "SkMatrixImageFilter.h"
21 #include "SkXfermode.h"
22
mtklein 2016/01/13 14:15:55 Might be nice to explain what belongs here too lik
reed1 2016/01/13 15:03:18 Done.
23 void SkFlattenable::PrivateInitializer::InitCore() {
24 // Shader
25 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapProcShader)
26 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorFilterShader)
27 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorShader)
28 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposeShader)
29 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkEmptyShader)
30 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkImageShader)
31 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLocalMatrixShader)
32 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPictureShader)
33
34 // PathEffect
35 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposePathEffect)
36
37 // ImageFilter
38 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMatrixImageFilter)
39
40 // ColorFilter
41 SkColorFilter::InitializeFlattenables();
42
43 // Xfermode
44 SkXfermode::InitializeFlattenables();
45
46 // Now initialize any effects (implemented in src/ports)
47 InitEffects();
48 };
49
50 SK_DECLARE_STATIC_ONCE(once);
51 void SkFlattenable::InitializeFlattenablesIfNeeded() {
52 SkOnce(&once, SkFlattenable::PrivateInitializer::InitCore);
53 }
OLDNEW
« no previous file with comments | « include/core/SkFlattenable.h ('k') | src/ports/SkGlobalInitialization_chromium.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698