OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "SkTypes.h" | 8 #include "SkTypes.h" |
9 | 9 |
10 #include "SkBitmapProcShader.h" | 10 #include "SkBitmapProcShader.h" |
11 #include "SkMallocPixelRef.h" | 11 #include "SkMallocPixelRef.h" |
12 #include "SkPathEffect.h" | 12 #include "SkPathEffect.h" |
13 #include "SkPixelRef.h" | 13 #include "SkPixelRef.h" |
14 #include "SkXfermode.h" | 14 #include "SkXfermode.h" |
15 | 15 |
16 #include "Sk1DPathEffect.h" | 16 #include "Sk1DPathEffect.h" |
17 #include "Sk2DPathEffect.h" | 17 #include "Sk2DPathEffect.h" |
18 #include "SkArithmeticMode.h" | 18 #include "SkArithmeticMode.h" |
19 #include "SkArcToPathEffect.h" | 19 #include "SkArcToPathEffect.h" |
20 #include "SkBitmapSource.h" | 20 #include "SkBitmapSourceDeserializer.h" |
21 #include "SkBlurDrawLooper.h" | 21 #include "SkBlurDrawLooper.h" |
22 #include "SkBlurImageFilter.h" | 22 #include "SkBlurImageFilter.h" |
23 #include "SkBlurMaskFilter.h" | 23 #include "SkBlurMaskFilter.h" |
24 #include "SkColorCubeFilter.h" | 24 #include "SkColorCubeFilter.h" |
25 #include "SkColorFilter.h" | 25 #include "SkColorFilter.h" |
26 #include "SkColorFilterImageFilter.h" | 26 #include "SkColorFilterImageFilter.h" |
27 #include "SkColorMatrixFilter.h" | 27 #include "SkColorMatrixFilter.h" |
28 #include "SkColorShader.h" | 28 #include "SkColorShader.h" |
29 #include "SkComposeImageFilter.h" | 29 #include "SkComposeImageFilter.h" |
30 #include "SkComposeShader.h" | 30 #include "SkComposeShader.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 // SkPictures are untrusted data. Please be extremely careful not to allow | 78 // SkPictures are untrusted data. Please be extremely careful not to allow |
79 // SkPictures created in a Chrome renderer to be deserialized in the main proce
ss. | 79 // SkPictures created in a Chrome renderer to be deserialized in the main proce
ss. |
80 // | 80 // |
81 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | 81 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
82 | 82 |
83 class SkPrivateEffectInitializer { | 83 class SkPrivateEffectInitializer { |
84 public: | 84 public: |
85 static void Init() { | 85 static void Init() { |
86 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkArcToPathEffect) | 86 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkArcToPathEffect) |
87 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapProcShader) | 87 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapProcShader) |
88 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapSource) | 88 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapSourceDeserializer) |
89 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurDrawLooper) | 89 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurDrawLooper) |
90 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurImageFilter) | 90 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurImageFilter) |
91 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorCubeFilter) | 91 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorCubeFilter) |
92 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorMatrixFilter) | 92 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorMatrixFilter) |
93 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorShader) | 93 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorShader) |
94 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposePathEffect) | 94 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposePathEffect) |
95 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposeShader) | 95 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposeShader) |
96 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkCornerPathEffect) | 96 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkCornerPathEffect) |
97 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDashPathEffect) | 97 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDashPathEffect) |
98 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDilateImageFilter) | 98 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDilateImageFilter) |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 SkLightingShader::InitializeFlattenables(); | 138 SkLightingShader::InitializeFlattenables(); |
139 SkTableColorFilter::InitializeFlattenables(); | 139 SkTableColorFilter::InitializeFlattenables(); |
140 SkXfermode::InitializeFlattenables(); | 140 SkXfermode::InitializeFlattenables(); |
141 } | 141 } |
142 }; | 142 }; |
143 | 143 |
144 SK_DECLARE_STATIC_ONCE(once); | 144 SK_DECLARE_STATIC_ONCE(once); |
145 void SkFlattenable::InitializeFlattenablesIfNeeded() { | 145 void SkFlattenable::InitializeFlattenablesIfNeeded() { |
146 SkOnce(&once, SkPrivateEffectInitializer::Init); | 146 SkOnce(&once, SkPrivateEffectInitializer::Init); |
147 } | 147 } |
OLD | NEW |