Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(798)

Unified Diff: src/ports/SkGlobalInitialization_chromium.cpp

Issue 23021015: Initial error handling code (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Adapting code to sk_once changes Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pipe/SkGPipeRead.cpp ('k') | src/ports/SkGlobalInitialization_default.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkGlobalInitialization_chromium.cpp
diff --git a/src/ports/SkGlobalInitialization_chromium.cpp b/src/ports/SkGlobalInitialization_chromium.cpp
index 3dd79c01f85388e74ef7d7b7599b21d0f020415c..d402c02e21e04dffa9f46d2cda7b0bf2aed03e3e 100644
--- a/src/ports/SkGlobalInitialization_chromium.cpp
+++ b/src/ports/SkGlobalInitialization_chromium.cpp
@@ -5,32 +5,116 @@
* found in the LICENSE file.
*/
+#include "SkTypes.h"
+
#include "SkBitmapProcShader.h"
+#include "SkMallocPixelRef.h"
+#include "SkPathEffect.h"
+#include "SkPixelRef.h"
+#include "SkXfermode.h"
+
+#include "Sk1DPathEffect.h"
+#include "Sk2DPathEffect.h"
+#include "SkArithmeticMode.h"
+#include "SkAvoidXfermode.h"
+#include "SkBicubicImageFilter.h"
+#include "SkBitmapSource.h"
+#include "SkBlurDrawLooper.h"
#include "SkBlurImageFilter.h"
#include "SkBlurMaskFilter.h"
#include "SkColorFilter.h"
+#include "SkColorFilterImageFilter.h"
+#include "SkColorMatrixFilter.h"
+#include "SkColorShader.h"
+#include "SkComposeImageFilter.h"
+#include "SkComposeShader.h"
#include "SkCornerPathEffect.h"
#include "SkDashPathEffect.h"
+#include "SkDiscretePathEffect.h"
+#include "SkDisplacementMapEffect.h"
+#include "SkDropShadowImageFilter.h"
+#include "SkEmptyShader.h"
+#include "SkEmbossMaskFilter.h"
+#include "SkFlattenable.h"
#include "SkGradientShader.h"
+#include "SkImages.h"
#include "SkLayerDrawLooper.h"
+#include "SkLayerRasterizer.h"
+#include "SkLerpXfermode.h"
+#include "SkLightingImageFilter.h"
#include "SkLumaColorFilter.h"
-#include "SkMallocPixelRef.h"
-#include "SkXfermode.h"
#include "SkMagnifierImageFilter.h"
+#include "SkMatrixConvolutionImageFilter.h"
+#include "SkMergeImageFilter.h"
+#include "SkMorphologyImageFilter.h"
+#include "SkOffsetImageFilter.h"
+#include "SkOnce.h"
+#include "SkPerlinNoiseShader.h"
+#include "SkPixelXorXfermode.h"
+#include "SkRectShaderImageFilter.h"
+#include "SkStippleMaskFilter.h"
+#include "SkTableColorFilter.h"
+#include "SkTestImageFilters.h"
+#include "SkTileImageFilter.h"
+#include "SkXfermodeImageFilter.h"
-void SkFlattenable::InitializeFlattenables() {
-
+static void InitializeFlattenables(int*) {
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkAvoidXfermode)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBicubicImageFilter)
SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapProcShader)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapSource)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurDrawLooper)
SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurImageFilter)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorMatrixFilter)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorShader)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposePathEffect)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposeShader)
SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkCornerPathEffect)
SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDashPathEffect)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDilateImageFilter)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDiscretePathEffect)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDisplacementMapEffect)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDropShadowImageFilter)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkEmbossMaskFilter)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkEmptyShader)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkErodeImageFilter)
SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLayerDrawLooper)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLayerRasterizer)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLerpXfermode)
SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLumaColorFilter)
- SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMallocPixelRef)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPath1DPathEffect)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(Sk2DPathEffect)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLine2DPathEffect)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPath2DPathEffect)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPerlinNoiseShader)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPixelXorXfermode)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkRectShaderImageFilter)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkStippleMaskFilter)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSumPathEffect)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkTileImageFilter)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkXfermodeImageFilter)
SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMagnifierImageFilter)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMatrixConvolutionImageFilter)
+
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkOffsetImageFilter)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposeImageFilter)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMergeImageFilter)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorFilterImageFilter)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDownSampleImageFilter)
+ SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMallocPixelRef)
+ SkArithmeticMode::InitializeFlattenables();
SkBlurMaskFilter::InitializeFlattenables();
SkColorFilter::InitializeFlattenables();
SkGradientShader::InitializeFlattenables();
+ SkImages::InitializeFlattenables();
+ SkLightingImageFilter::InitializeFlattenables();
+ SkTableColorFilter::InitializeFlattenables();
SkXfermode::InitializeFlattenables();
}
+
+void SkFlattenable::InitializeFlattenablesIfNeeded() {
+ int dummy;
+ SK_DECLARE_STATIC_ONCE(once);
+ SkOnce(&once, InitializeFlattenables, &dummy);
+}
« no previous file with comments | « src/pipe/SkGPipeRead.cpp ('k') | src/ports/SkGlobalInitialization_default.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698