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" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 #include "SkMatrixConvolutionImageFilter.h" | 46 #include "SkMatrixConvolutionImageFilter.h" |
47 #include "SkMergeImageFilter.h" | 47 #include "SkMergeImageFilter.h" |
48 #include "SkMorphologyImageFilter.h" | 48 #include "SkMorphologyImageFilter.h" |
49 #include "SkOffsetImageFilter.h" | 49 #include "SkOffsetImageFilter.h" |
50 #include "SkOnce.h" | 50 #include "SkOnce.h" |
51 #include "SkPerlinNoiseShader.h" | 51 #include "SkPerlinNoiseShader.h" |
52 #include "SkPictureImageFilter.h" | 52 #include "SkPictureImageFilter.h" |
53 #include "SkPictureShader.h" | 53 #include "SkPictureShader.h" |
54 #include "SkPixelXorXfermode.h" | 54 #include "SkPixelXorXfermode.h" |
55 #include "SkRectShaderImageFilter.h" | 55 #include "SkRectShaderImageFilter.h" |
56 #include "SkStippleMaskFilter.h" | |
57 #include "SkTableColorFilter.h" | 56 #include "SkTableColorFilter.h" |
58 #include "SkTestImageFilters.h" | 57 #include "SkTestImageFilters.h" |
59 #include "SkTileImageFilter.h" | 58 #include "SkTileImageFilter.h" |
60 #include "SkMatrixImageFilter.h" | 59 #include "SkMatrixImageFilter.h" |
61 #include "SkXfermodeImageFilter.h" | 60 #include "SkXfermodeImageFilter.h" |
62 | 61 |
63 static void InitializeFlattenables() { | 62 static void InitializeFlattenables() { |
64 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkAvoidXfermode) | 63 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkAvoidXfermode) |
65 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapProcShader) | 64 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapProcShader) |
66 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapSource) | 65 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapSource) |
(...skipping 18 matching lines...) Expand all Loading... |
85 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLocalMatrixShader) | 84 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLocalMatrixShader) |
86 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLumaColorFilter) | 85 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLumaColorFilter) |
87 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPath1DPathEffect) | 86 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPath1DPathEffect) |
88 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLine2DPathEffect) | 87 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLine2DPathEffect) |
89 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPath2DPathEffect) | 88 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPath2DPathEffect) |
90 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPerlinNoiseShader) | 89 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPerlinNoiseShader) |
91 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPictureImageFilter) | 90 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPictureImageFilter) |
92 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPictureShader) | 91 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPictureShader) |
93 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPixelXorXfermode) | 92 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPixelXorXfermode) |
94 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkRectShaderImageFilter) | 93 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkRectShaderImageFilter) |
95 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkStippleMaskFilter) | |
96 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSumPathEffect) | 94 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSumPathEffect) |
97 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkTileImageFilter) | 95 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkTileImageFilter) |
98 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMatrixImageFilter) | 96 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMatrixImageFilter) |
99 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkXfermodeImageFilter) | 97 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkXfermodeImageFilter) |
100 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMagnifierImageFilter) | 98 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMagnifierImageFilter) |
101 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMatrixConvolutionImageFilter) | 99 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMatrixConvolutionImageFilter) |
102 | 100 |
103 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkOffsetImageFilter) | 101 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkOffsetImageFilter) |
104 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposeImageFilter) | 102 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposeImageFilter) |
105 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMergeImageFilter) | 103 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMergeImageFilter) |
106 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorFilterImageFilter) | 104 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorFilterImageFilter) |
107 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDownSampleImageFilter) | 105 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDownSampleImageFilter) |
108 | 106 |
109 SkArithmeticMode::InitializeFlattenables(); | 107 SkArithmeticMode::InitializeFlattenables(); |
110 SkBlurMaskFilter::InitializeFlattenables(); | 108 SkBlurMaskFilter::InitializeFlattenables(); |
111 SkColorFilter::InitializeFlattenables(); | 109 SkColorFilter::InitializeFlattenables(); |
112 SkGradientShader::InitializeFlattenables(); | 110 SkGradientShader::InitializeFlattenables(); |
113 SkLightingImageFilter::InitializeFlattenables(); | 111 SkLightingImageFilter::InitializeFlattenables(); |
114 SkTableColorFilter::InitializeFlattenables(); | 112 SkTableColorFilter::InitializeFlattenables(); |
115 SkXfermode::InitializeFlattenables(); | 113 SkXfermode::InitializeFlattenables(); |
116 | 114 |
117 } | 115 } |
118 | 116 |
119 void SkFlattenable::InitializeFlattenablesIfNeeded() { | 117 void SkFlattenable::InitializeFlattenablesIfNeeded() { |
120 SK_DECLARE_STATIC_ONCE(once); | 118 SK_DECLARE_STATIC_ONCE(once); |
121 SkOnce(&once, InitializeFlattenables); | 119 SkOnce(&once, InitializeFlattenables); |
122 } | 120 } |
OLD | NEW |