blob: fc454b47fc2dd5c9c9e31b26b29dc3204377f4a5 [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 "SkFlipPixelRef.h"
12#include "SkImageRef_ashmem.h"
13#include "SkImageRef_GlobalPool.h"
14#include "SkMallocPixelRef.h"
15#include "SkPathEffect.h"
16#include "SkPixelRef.h"
caryclark@google.comd26147a2011-12-15 14:16:43 +000017#include "SkXfermode.h"
18
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000019#include "Sk1DPathEffect.h"
20#include "Sk2DPathEffect.h"
21#include "SkAvoidXfermode.h"
senorblanco@chromium.orgd912ca42012-08-23 19:10:04 +000022#include "SkBitmapSource.h"
senorblanco@chromium.org35c5ff02012-08-22 18:34:16 +000023#include "SkBlendImageFilter.h"
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000024#include "SkBlurDrawLooper.h"
25#include "SkBlurImageFilter.h"
26#include "SkBlurMaskFilter.h"
27#include "SkColorFilter.h"
senorblanco@chromium.org392e14e2012-08-20 19:45:02 +000028#include "SkColorFilterImageFilter.h"
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000029#include "SkColorMatrixFilter.h"
30#include "SkColorShader.h"
scroggob3c0f482012-07-02 19:07:57 +000031#include "SkColorTable.h"
32#include "SkComposeShader.h"
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000033#include "SkCornerPathEffect.h"
34#include "SkDashPathEffect.h"
35#include "SkDiscretePathEffect.h"
36#include "SkEmptyShader.h"
scroggo@google.com72ae6bd2012-04-20 18:42:55 +000037#include "SkEmbossMaskFilter.h"
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000038#include "SkFlattenable.h"
39#include "SkGradientShader.h"
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000040#include "SkLayerDrawLooper.h"
41#include "SkLayerRasterizer.h"
djsollen@google.com08337772012-06-26 14:33:13 +000042#include "SkLightingImageFilter.h"
senorblanco@chromium.org35c5ff02012-08-22 18:34:16 +000043#include "SkMagnifierImageFilter.h"
senorblanco@chromium.orgb4ca9df2012-09-19 22:50:21 +000044#include "SkMatrixConvolutionImageFilter.h"
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000045#include "SkMorphologyImageFilter.h"
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000046#include "SkPixelXorXfermode.h"
robertphillips@google.com088719e2012-06-05 13:22:14 +000047#include "SkStippleMaskFilter.h"
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000048#include "SkTableColorFilter.h"
49#include "SkTestImageFilters.h"
50
caryclark@google.comd26147a2011-12-15 14:16:43 +000051void SkFlattenable::InitializeFlattenables() {
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000052
53 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkAvoidXfermode)
54 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapProcShader)
senorblanco@chromium.orgd912ca42012-08-23 19:10:04 +000055 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapSource)
senorblanco@chromium.orgb2ee33c2012-08-22 16:24:44 +000056 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlendImageFilter)
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000057 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurDrawLooper)
58 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurImageFilter)
59 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorMatrixFilter)
60 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorShader)
scroggob3c0f482012-07-02 19:07:57 +000061 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorTable)
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000062 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposePathEffect)
scroggob3c0f482012-07-02 19:07:57 +000063 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposeShader)
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000064 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkCornerPathEffect)
65 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDashPathEffect)
66 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDilateImageFilter)
67 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDiscretePathEffect)
scroggo@google.com72ae6bd2012-04-20 18:42:55 +000068 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkEmbossMaskFilter)
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000069 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkEmptyShader)
70 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkErodeImageFilter)
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000071 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLayerDrawLooper)
72 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLayerRasterizer)
73 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPath1DPathEffect)
scroggo@google.comd8a6cc82012-09-12 18:53:49 +000074 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(Sk2DPathEffect)
75 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLine2DPathEffect)
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000076 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPath2DPathEffect)
77 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPixelXorXfermode)
robertphillips@google.com941ee932012-06-05 12:55:05 +000078 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkStippleMaskFilter)
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000079 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSumPathEffect)
bsalomon@google.com82aa7482012-08-13 14:22:17 +000080 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMagnifierImageFilter)
senorblanco@chromium.orgb4ca9df2012-09-19 22:50:21 +000081 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMatrixConvolutionImageFilter)
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000082
83 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkOffsetImageFilter)
84 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposeImageFilter)
85 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMergeImageFilter)
86 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkColorFilterImageFilter)
87 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDownSampleImageFilter)
88
djsollen@google.com5370cd92012-03-28 20:47:01 +000089 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkFlipPixelRef)
90 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkImageRef_GlobalPool)
91 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMallocPixelRef)
92
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000093 SkBlurMaskFilter::InitializeFlattenables();
94 SkColorFilter::InitializeFlattenables();
95 SkGradientShader::InitializeFlattenables();
djsollen@google.com08337772012-06-26 14:33:13 +000096 SkLightingImageFilter::InitializeFlattenables();
djsollen@google.coma2ca41e2012-03-23 19:00:34 +000097 SkTableColorFilter::InitializeFlattenables();
98 SkXfermode::InitializeFlattenables();
caryclark@google.comd26147a2011-12-15 14:16:43 +000099}