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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 #include "SkOnce.h" | 51 #include "SkOnce.h" |
52 #include "SkPerlinNoiseShader.h" | 52 #include "SkPerlinNoiseShader.h" |
53 #include "SkPictureImageFilter.h" | 53 #include "SkPictureImageFilter.h" |
54 #include "SkPixelXorXfermode.h" | 54 #include "SkPixelXorXfermode.h" |
55 #include "SkRectShaderImageFilter.h" | 55 #include "SkRectShaderImageFilter.h" |
56 #include "SkResizeImageFilter.h" | 56 #include "SkResizeImageFilter.h" |
57 #include "SkStippleMaskFilter.h" | 57 #include "SkStippleMaskFilter.h" |
58 #include "SkTableColorFilter.h" | 58 #include "SkTableColorFilter.h" |
59 #include "SkTestImageFilters.h" | 59 #include "SkTestImageFilters.h" |
60 #include "SkTileImageFilter.h" | 60 #include "SkTileImageFilter.h" |
| 61 #include "SkMatrixImageFilter.h" |
61 #include "SkXfermodeImageFilter.h" | 62 #include "SkXfermodeImageFilter.h" |
62 | 63 |
63 static void InitializeFlattenables(int*) { | 64 static void InitializeFlattenables(int*) { |
64 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkAvoidXfermode) | 65 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkAvoidXfermode) |
65 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBicubicImageFilter) | 66 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBicubicImageFilter) |
66 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapProcShader) | 67 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapProcShader) |
67 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapSource) | 68 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapSource) |
68 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurDrawLooper) | 69 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurDrawLooper) |
69 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurImageFilter) | 70 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurImageFilter) |
70 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorMatrixFilter) | 71 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorMatrixFilter) |
(...skipping 18 matching lines...) Expand all Loading... |
89 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLine2DPathEffect) | 90 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLine2DPathEffect) |
90 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPath2DPathEffect) | 91 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPath2DPathEffect) |
91 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPerlinNoiseShader) | 92 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPerlinNoiseShader) |
92 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPictureImageFilter) | 93 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPictureImageFilter) |
93 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPixelXorXfermode) | 94 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPixelXorXfermode) |
94 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkRectShaderImageFilter) | 95 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkRectShaderImageFilter) |
95 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkResizeImageFilter) | 96 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkResizeImageFilter) |
96 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkStippleMaskFilter) | 97 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkStippleMaskFilter) |
97 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSumPathEffect) | 98 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSumPathEffect) |
98 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkTileImageFilter) | 99 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkTileImageFilter) |
| 100 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMatrixImageFilter) |
99 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkXfermodeImageFilter) | 101 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkXfermodeImageFilter) |
100 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMagnifierImageFilter) | 102 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMagnifierImageFilter) |
101 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMatrixConvolutionImageFilter) | 103 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMatrixConvolutionImageFilter) |
102 | 104 |
103 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkOffsetImageFilter) | 105 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkOffsetImageFilter) |
104 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposeImageFilter) | 106 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposeImageFilter) |
105 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMergeImageFilter) | 107 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMergeImageFilter) |
106 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorFilterImageFilter) | 108 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorFilterImageFilter) |
107 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDownSampleImageFilter) | 109 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDownSampleImageFilter) |
108 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMallocPixelRef) | 110 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMallocPixelRef) |
109 | 111 |
110 SkArithmeticMode::InitializeFlattenables(); | 112 SkArithmeticMode::InitializeFlattenables(); |
111 SkBlurMaskFilter::InitializeFlattenables(); | 113 SkBlurMaskFilter::InitializeFlattenables(); |
112 SkColorFilter::InitializeFlattenables(); | 114 SkColorFilter::InitializeFlattenables(); |
113 SkGradientShader::InitializeFlattenables(); | 115 SkGradientShader::InitializeFlattenables(); |
114 SkImages::InitializeFlattenables(); | 116 SkImages::InitializeFlattenables(); |
115 SkLightingImageFilter::InitializeFlattenables(); | 117 SkLightingImageFilter::InitializeFlattenables(); |
116 SkTableColorFilter::InitializeFlattenables(); | 118 SkTableColorFilter::InitializeFlattenables(); |
117 SkXfermode::InitializeFlattenables(); | 119 SkXfermode::InitializeFlattenables(); |
118 } | 120 } |
119 | 121 |
120 void SkFlattenable::InitializeFlattenablesIfNeeded() { | 122 void SkFlattenable::InitializeFlattenablesIfNeeded() { |
121 int dummy; | 123 int dummy; |
122 SK_DECLARE_STATIC_ONCE(once); | 124 SK_DECLARE_STATIC_ONCE(once); |
123 SkOnce(&once, InitializeFlattenables, &dummy); | 125 SkOnce(&once, InitializeFlattenables, &dummy); |
124 } | 126 } |
OLD | NEW |