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 14 matching lines...) Expand all Loading... |
25 * Registers all of the required effects subclasses for picture deserialization
. | 25 * Registers all of the required effects subclasses for picture deserialization
. |
26 * | 26 * |
27 * Optional subclasses (e.g. Blur) should be registered in the ports/ version o
f this file, | 27 * Optional subclasses (e.g. Blur) should be registered in the ports/ version o
f this file, |
28 * inside the InitEffects() method. | 28 * inside the InitEffects() method. |
29 */ | 29 */ |
30 void SkFlattenable::PrivateInitializer::InitCore() { | 30 void SkFlattenable::PrivateInitializer::InitCore() { |
31 // Shader | 31 // Shader |
32 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapProcShader) | 32 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapProcShader) |
33 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorFilterShader) | 33 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorFilterShader) |
34 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorShader) | 34 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorShader) |
| 35 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColor4Shader) |
35 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposeShader) | 36 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposeShader) |
36 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkEmptyShader) | 37 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkEmptyShader) |
37 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkImageShader) | 38 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkImageShader) |
38 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLocalMatrixShader) | 39 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLocalMatrixShader) |
39 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPictureShader) | 40 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPictureShader) |
40 | 41 |
41 // PathEffect | 42 // PathEffect |
42 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposePathEffect) | 43 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposePathEffect) |
43 | 44 |
44 // ImageFilter | 45 // ImageFilter |
45 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMatrixImageFilter) | 46 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMatrixImageFilter) |
46 | 47 |
47 // ColorFilter | 48 // ColorFilter |
48 SkColorFilter::InitializeFlattenables(); | 49 SkColorFilter::InitializeFlattenables(); |
49 | 50 |
50 // Xfermode | 51 // Xfermode |
51 SkXfermode::InitializeFlattenables(); | 52 SkXfermode::InitializeFlattenables(); |
52 | 53 |
53 // Drawable | 54 // Drawable |
54 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkRecordedDrawable) | 55 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkRecordedDrawable) |
55 | 56 |
56 // Now initialize any optional/additional effects (implemented in src/ports) | 57 // Now initialize any optional/additional effects (implemented in src/ports) |
57 InitEffects(); | 58 InitEffects(); |
58 }; | 59 }; |
59 | 60 |
60 void SkFlattenable::InitializeFlattenablesIfNeeded() { | 61 void SkFlattenable::InitializeFlattenablesIfNeeded() { |
61 static SkOnce once; | 62 static SkOnce once; |
62 once(SkFlattenable::PrivateInitializer::InitCore); | 63 once(SkFlattenable::PrivateInitializer::InitCore); |
63 } | 64 } |
OLD | NEW |