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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 #include "SkPictureShader.h" | 55 #include "SkPictureShader.h" |
56 #include "SkPixelXorXfermode.h" | 56 #include "SkPixelXorXfermode.h" |
57 #include "SkRectShaderImageFilter.h" | 57 #include "SkRectShaderImageFilter.h" |
58 #include "SkStippleMaskFilter.h" | 58 #include "SkStippleMaskFilter.h" |
59 #include "SkTableColorFilter.h" | 59 #include "SkTableColorFilter.h" |
60 #include "SkTestImageFilters.h" | 60 #include "SkTestImageFilters.h" |
61 #include "SkTileImageFilter.h" | 61 #include "SkTileImageFilter.h" |
62 #include "SkMatrixImageFilter.h" | 62 #include "SkMatrixImageFilter.h" |
63 #include "SkXfermodeImageFilter.h" | 63 #include "SkXfermodeImageFilter.h" |
64 | 64 |
65 static void InitializeFlattenables(int*) { | 65 static void InitializeFlattenables() { |
66 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkAvoidXfermode) | 66 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkAvoidXfermode) |
67 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBicubicImageFilter) | 67 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBicubicImageFilter) |
68 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapProcShader) | 68 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapProcShader) |
69 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapSource) | 69 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapSource) |
70 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurDrawLooper) | 70 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurDrawLooper) |
71 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurImageFilter) | 71 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurImageFilter) |
72 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorMatrixFilter) | 72 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorMatrixFilter) |
73 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorShader) | 73 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorShader) |
74 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposePathEffect) | 74 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposePathEffect) |
75 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposeShader) | 75 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposeShader) |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 SkBlurMaskFilter::InitializeFlattenables(); | 115 SkBlurMaskFilter::InitializeFlattenables(); |
116 SkColorFilter::InitializeFlattenables(); | 116 SkColorFilter::InitializeFlattenables(); |
117 SkGradientShader::InitializeFlattenables(); | 117 SkGradientShader::InitializeFlattenables(); |
118 SkImages::InitializeFlattenables(); | 118 SkImages::InitializeFlattenables(); |
119 SkLightingImageFilter::InitializeFlattenables(); | 119 SkLightingImageFilter::InitializeFlattenables(); |
120 SkTableColorFilter::InitializeFlattenables(); | 120 SkTableColorFilter::InitializeFlattenables(); |
121 SkXfermode::InitializeFlattenables(); | 121 SkXfermode::InitializeFlattenables(); |
122 } | 122 } |
123 | 123 |
124 void SkFlattenable::InitializeFlattenablesIfNeeded() { | 124 void SkFlattenable::InitializeFlattenablesIfNeeded() { |
125 int dummy; | |
126 SK_DECLARE_STATIC_ONCE(once); | 125 SK_DECLARE_STATIC_ONCE(once); |
127 SkOnce(&once, InitializeFlattenables, &dummy); | 126 SkOnce(&once, InitializeFlattenables); |
128 } | 127 } |
OLD | NEW |