blob: a764dd178c5c86f4b8354054acd233901a444506 [file] [log] [blame]
caryclark@google.comd26147a2011-12-15 14:16:43 +00001/*
2 * Copyright 2011 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
rmistry@google.comd6176b02012-08-23 18:14:13 +00007
caryclark@google.comd26147a2011-12-15 14:16:43 +00008#include "SkTypes.h"
9
caryclark@google.comd26147a2011-12-15 14:16:43 +000010#include "SkBitmapProcShader.h"
caryclark@google.comd26147a2011-12-15 14:16:43 +000011#include "SkImageRef_ashmem.h"
caryclark@google.comd26147a2011-12-15 14:16:43 +000012#include "SkMallocPixelRef.h"
13#include "SkPathEffect.h"
14#include "SkPixelRef.h"
caryclark@google.comd26147a2011-12-15 14:16:43 +000015#include "SkXfermode.h"
16
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000017#include "Sk1DPathEffect.h"
18#include "Sk2DPathEffect.h"
19#include "SkAvoidXfermode.h"
senorblanco@chromium.orgd912ca42012-08-23 19:10:04 +000020#include "SkBitmapSource.h"
senorblanco@chromium.org35c5ff02012-08-22 18:34:16 +000021#include "SkBlendImageFilter.h"
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000022#include "SkBlurDrawLooper.h"
23#include "SkBlurImageFilter.h"
24#include "SkBlurMaskFilter.h"
25#include "SkColorFilter.h"
senorblanco@chromium.org392e14e2012-08-20 19:45:02 +000026#include "SkColorFilterImageFilter.h"
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000027#include "SkColorMatrixFilter.h"
28#include "SkColorShader.h"
scroggob3c0f482012-07-02 19:07:57 +000029#include "SkColorTable.h"
30#include "SkComposeShader.h"
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000031#include "SkCornerPathEffect.h"
32#include "SkDashPathEffect.h"
33#include "SkDiscretePathEffect.h"
34#include "SkEmptyShader.h"
scroggo@google.com72ae6bd2012-04-20 18:42:55 +000035#include "SkEmbossMaskFilter.h"
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000036#include "SkFlattenable.h"
37#include "SkGradientShader.h"
scroggo@google.com5a7c6be2012-10-04 21:46:08 +000038#include "SkImages.h"
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000039#include "SkLayerDrawLooper.h"
40#include "SkLayerRasterizer.h"
djsollen@google.com08337772012-06-26 14:33:13 +000041#include "SkLightingImageFilter.h"
senorblanco@chromium.org35c5ff02012-08-22 18:34:16 +000042#include "SkMagnifierImageFilter.h"
senorblanco@chromium.orgb4ca9df2012-09-19 22:50:21 +000043#include "SkMatrixConvolutionImageFilter.h"
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000044#include "SkMorphologyImageFilter.h"
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000045#include "SkPixelXorXfermode.h"
robertphillips@google.com088719e2012-06-05 13:22:14 +000046#include "SkStippleMaskFilter.h"
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000047#include "SkTableColorFilter.h"
48#include "SkTestImageFilters.h"
49
caryclark@google.comd26147a2011-12-15 14:16:43 +000050void SkFlattenable::InitializeFlattenables() {
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000051
52 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkAvoidXfermode)
53 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapProcShader)
senorblanco@chromium.orgd912ca42012-08-23 19:10:04 +000054 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapSource)
senorblanco@chromium.orgb2ee33c2012-08-22 16:24:44 +000055 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlendImageFilter)
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000056 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurDrawLooper)
57 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurImageFilter)
58 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorMatrixFilter)
59 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorShader)
scroggob3c0f482012-07-02 19:07:57 +000060 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorTable)
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000061 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposePathEffect)
scroggob3c0f482012-07-02 19:07:57 +000062 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposeShader)
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000063 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkCornerPathEffect)
64 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDashPathEffect)
65 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDilateImageFilter)
66 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDiscretePathEffect)
scroggo@google.com72ae6bd2012-04-20 18:42:55 +000067 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkEmbossMaskFilter)
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000068 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkEmptyShader)
69 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkErodeImageFilter)
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000070 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLayerDrawLooper)
71 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLayerRasterizer)
72 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPath1DPathEffect)
scroggo@google.comd8a6cc82012-09-12 18:53:49 +000073 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(Sk2DPathEffect)
74 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLine2DPathEffect)
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000075 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPath2DPathEffect)
76 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPixelXorXfermode)
robertphillips@google.com941ee932012-06-05 12:55:05 +000077 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkStippleMaskFilter)
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000078 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSumPathEffect)
bsalomon@google.com82aa7482012-08-13 14:22:17 +000079 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMagnifierImageFilter)
senorblanco@chromium.orgb4ca9df2012-09-19 22:50:21 +000080 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMatrixConvolutionImageFilter)
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000081
82 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkOffsetImageFilter)
83 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposeImageFilter)
84 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMergeImageFilter)
85 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorFilterImageFilter)
86 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDownSampleImageFilter)
djsollen@google.com5370cd92012-03-28 20:47:01 +000087 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMallocPixelRef)
88
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000089 SkBlurMaskFilter::InitializeFlattenables();
90 SkColorFilter::InitializeFlattenables();
91 SkGradientShader::InitializeFlattenables();
scroggo@google.com5a7c6be2012-10-04 21:46:08 +000092 SkImages::InitializeFlattenables();
djsollen@google.com08337772012-06-26 14:33:13 +000093 SkLightingImageFilter::InitializeFlattenables();
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000094 SkTableColorFilter::InitializeFlattenables();
95 SkXfermode::InitializeFlattenables();
caryclark@google.comd26147a2011-12-15 14:16:43 +000096}