From: tfarina@chromium.org Date: Fri, 12 Oct 2012 14:41:39 +0000 (+0000) Subject: Export effects classes with SK_API. X-Git-Tag: accepted/tizen/5.0/unified/20181102.025319~14589 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6806fe87e0b39e283291c1a1c7d1d864230aa2aa;p=platform%2Fupstream%2FlibSkiaSharp.git Export effects classes with SK_API. So this works in shared_library build in chromium. This issue was raised up in the following chromium-dev thread: https://groups.google.com/a/chromium.org/forum/?hl=en&fromgroups=#!topic/chromium-dev/Z6qzEw8MwVY R=epoger@google.com,tomhudson@google.com Review URL: https://codereview.appspot.com/6601065 git-svn-id: http://skia.googlecode.com/svn/trunk@5914 2bbb7eff-a529-9590-31e7-b0007b416f81 --- diff --git a/include/effects/Sk1DPathEffect.h b/include/effects/Sk1DPathEffect.h index 9fad1ef..6624b4b 100644 --- a/include/effects/Sk1DPathEffect.h +++ b/include/effects/Sk1DPathEffect.h @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * @@ -6,7 +5,6 @@ * found in the LICENSE file. */ - #ifndef Sk1DPathEffect_DEFINED #define Sk1DPathEffect_DEFINED @@ -15,8 +13,8 @@ class SkPathMeasure; -// This class is not exported to java. -class Sk1DPathEffect : public SkPathEffect { +// This class is not exported to java. +class SK_API Sk1DPathEffect : public SkPathEffect { public: virtual bool filterPath(SkPath* dst, const SkPath& src, SkStrokeRec*) SK_OVERRIDE; @@ -36,7 +34,7 @@ private: typedef SkPathEffect INHERITED; }; -class SkPath1DPathEffect : public Sk1DPathEffect { +class SK_API SkPath1DPathEffect : public Sk1DPathEffect { public: enum Style { kTranslate_Style, // translate the shape to each position @@ -76,5 +74,4 @@ private: typedef Sk1DPathEffect INHERITED; }; - #endif diff --git a/include/effects/Sk2DPathEffect.h b/include/effects/Sk2DPathEffect.h index 7000755..feb0da6 100644 --- a/include/effects/Sk2DPathEffect.h +++ b/include/effects/Sk2DPathEffect.h @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * @@ -6,7 +5,6 @@ * found in the LICENSE file. */ - #ifndef Sk2DPathEffect_DEFINED #define Sk2DPathEffect_DEFINED @@ -14,7 +12,7 @@ #include "SkPathEffect.h" #include "SkMatrix.h" -class Sk2DPathEffect : public SkPathEffect { +class SK_API Sk2DPathEffect : public SkPathEffect { public: Sk2DPathEffect(const SkMatrix& mat); @@ -58,7 +56,7 @@ private: typedef SkPathEffect INHERITED; }; -class SkLine2DPathEffect : public Sk2DPathEffect { +class SK_API SkLine2DPathEffect : public Sk2DPathEffect { public: SkLine2DPathEffect(SkScalar width, const SkMatrix& matrix) : Sk2DPathEffect(matrix), fWidth(width) {} @@ -80,7 +78,7 @@ private: typedef Sk2DPathEffect INHERITED; }; -class SkPath2DPathEffect : public Sk2DPathEffect { +class SK_API SkPath2DPathEffect : public Sk2DPathEffect { public: /** * Stamp the specified path to fill the shape, using the matrix to define @@ -102,5 +100,4 @@ private: typedef Sk2DPathEffect INHERITED; }; - #endif diff --git a/include/effects/SkArithmeticMode.h b/include/effects/SkArithmeticMode.h index 70d660f..87da333 100644 --- a/include/effects/SkArithmeticMode.h +++ b/include/effects/SkArithmeticMode.h @@ -10,7 +10,7 @@ #include "SkXfermode.h" -class SkArithmeticMode : public SkXfermode { +class SK_API SkArithmeticMode : public SkXfermode { public: /** * result = clamp[k1 * src * dst + k2 * src + k3 * dst + k4] @@ -27,4 +27,3 @@ public: }; #endif - diff --git a/include/effects/SkAvoidXfermode.h b/include/effects/SkAvoidXfermode.h index 298ce5b..1be2679 100644 --- a/include/effects/SkAvoidXfermode.h +++ b/include/effects/SkAvoidXfermode.h @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * @@ -6,7 +5,6 @@ * found in the LICENSE file. */ - #ifndef SkAvoidXfermode_DEFINED #define SkAvoidXfermode_DEFINED @@ -17,7 +15,7 @@ This xfermode will draw the src everywhere except on top of the specified color. */ -class SkAvoidXfermode : public SkXfermode { +class SK_API SkAvoidXfermode : public SkXfermode { public: enum Mode { kAvoidColor_Mode, //!< draw everywhere except on the opColor diff --git a/include/effects/SkBitmapSource.h b/include/effects/SkBitmapSource.h index 5e07e9e..138987e 100644 --- a/include/effects/SkBitmapSource.h +++ b/include/effects/SkBitmapSource.h @@ -5,7 +5,6 @@ * found in the LICENSE file. */ - #ifndef SkBitmapSource_DEFINED #define SkBitmapSource_DEFINED @@ -30,4 +29,3 @@ private: }; #endif - diff --git a/include/effects/SkBlendImageFilter.h b/include/effects/SkBlendImageFilter.h index ff528ad..c16186f 100644 --- a/include/effects/SkBlendImageFilter.h +++ b/include/effects/SkBlendImageFilter.h @@ -5,7 +5,6 @@ * found in the LICENSE file. */ - #ifndef SkBlendImageFilter_DEFINED #define SkBlendImageFilter_DEFINED @@ -49,4 +48,3 @@ private: }; #endif - diff --git a/include/effects/SkBlurDrawLooper.h b/include/effects/SkBlurDrawLooper.h index 0f400cd..fa730e3 100644 --- a/include/effects/SkBlurDrawLooper.h +++ b/include/effects/SkBlurDrawLooper.h @@ -1,4 +1,3 @@ - /* * Copyright 2008 The Android Open Source Project * diff --git a/include/effects/SkBlurImageFilter.h b/include/effects/SkBlurImageFilter.h index eeafbb9..757fee5 100644 --- a/include/effects/SkBlurImageFilter.h +++ b/include/effects/SkBlurImageFilter.h @@ -5,7 +5,6 @@ * found in the LICENSE file. */ - #ifndef SkBlurImageFilter_DEFINED #define SkBlurImageFilter_DEFINED @@ -34,4 +33,3 @@ private: }; #endif - diff --git a/include/effects/SkBlurMaskFilter.h b/include/effects/SkBlurMaskFilter.h index 500e6d6..2ab321a 100644 --- a/include/effects/SkBlurMaskFilter.h +++ b/include/effects/SkBlurMaskFilter.h @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * @@ -6,7 +5,6 @@ * found in the LICENSE file. */ - #ifndef SkBlurMaskFilter_DEFINED #define SkBlurMaskFilter_DEFINED @@ -61,4 +59,3 @@ private: }; #endif - diff --git a/include/effects/SkColorFilterImageFilter.h b/include/effects/SkColorFilterImageFilter.h index 73b3fa9..f519291 100755 --- a/include/effects/SkColorFilterImageFilter.h +++ b/include/effects/SkColorFilterImageFilter.h @@ -12,7 +12,7 @@ class SkColorFilter; -class SkColorFilterImageFilter : public SkSingleInputImageFilter { +class SK_API SkColorFilterImageFilter : public SkSingleInputImageFilter { public: SkColorFilterImageFilter(SkColorFilter* cf, SkImageFilter* input = NULL); virtual ~SkColorFilterImageFilter(); diff --git a/include/effects/SkColorMatrix.h b/include/effects/SkColorMatrix.h index a92f588..ff02d9d 100644 --- a/include/effects/SkColorMatrix.h +++ b/include/effects/SkColorMatrix.h @@ -1,4 +1,3 @@ - /* * Copyright 2007 The Android Open Source Project * @@ -6,13 +5,12 @@ * found in the LICENSE file. */ - #ifndef SkColorMatrix_DEFINED #define SkColorMatrix_DEFINED #include "SkScalar.h" -class SkColorMatrix { +class SK_API SkColorMatrix { public: SkScalar fMat[20]; diff --git a/include/effects/SkColorMatrixFilter.h b/include/effects/SkColorMatrixFilter.h index 07bd967..005781f 100644 --- a/include/effects/SkColorMatrixFilter.h +++ b/include/effects/SkColorMatrixFilter.h @@ -1,4 +1,3 @@ - /* * Copyright 2007 The Android Open Source Project * @@ -6,7 +5,6 @@ * found in the LICENSE file. */ - #ifndef SkColorMatrixFilter_DEFINED #define SkColorMatrixFilter_DEFINED diff --git a/include/effects/SkCornerPathEffect.h b/include/effects/SkCornerPathEffect.h index 6c43b6c..88afea3 100644 --- a/include/effects/SkCornerPathEffect.h +++ b/include/effects/SkCornerPathEffect.h @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * @@ -6,7 +5,6 @@ * found in the LICENSE file. */ - #ifndef SkCornerPathEffect_DEFINED #define SkCornerPathEffect_DEFINED @@ -42,4 +40,3 @@ private: }; #endif - diff --git a/include/effects/SkDashPathEffect.h b/include/effects/SkDashPathEffect.h index ddac9cf..0397466 100644 --- a/include/effects/SkDashPathEffect.h +++ b/include/effects/SkDashPathEffect.h @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * @@ -6,7 +5,6 @@ * found in the LICENSE file. */ - #ifndef SkDashPathEffect_DEFINED #define SkDashPathEffect_DEFINED @@ -65,4 +63,3 @@ private: }; #endif - diff --git a/include/effects/SkDiscretePathEffect.h b/include/effects/SkDiscretePathEffect.h index a2934de..6705748 100644 --- a/include/effects/SkDiscretePathEffect.h +++ b/include/effects/SkDiscretePathEffect.h @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * @@ -6,7 +5,6 @@ * found in the LICENSE file. */ - #ifndef SkDiscretePathEffect_DEFINED #define SkDiscretePathEffect_DEFINED @@ -16,7 +14,7 @@ This path effect chops a path into discrete segments, and randomly displaces them. */ -class SkDiscretePathEffect : public SkPathEffect { +class SK_API SkDiscretePathEffect : public SkPathEffect { public: /** Break the path into segments of segLength length, and randomly move the endpoints away from the original path by a maximum of deviation. @@ -39,4 +37,3 @@ private: }; #endif - diff --git a/include/effects/SkDrawExtraPathEffect.h b/include/effects/SkDrawExtraPathEffect.h index c7611f0..392a46b 100644 --- a/include/effects/SkDrawExtraPathEffect.h +++ b/include/effects/SkDrawExtraPathEffect.h @@ -1,4 +1,3 @@ - /* * Copyright 2008 The Android Open Source Project * @@ -6,10 +5,11 @@ * found in the LICENSE file. */ - #ifndef SK_DRAW_EXTRA_PATH_EFFECT_H #define SK_DRAW_EXTRA_PATH_EFFECT_H + class SkAnimator; + void InitializeSkExtraPathEffects(SkAnimator* animator); -#endif +#endif diff --git a/include/effects/SkEmbossMaskFilter.h b/include/effects/SkEmbossMaskFilter.h index dc5f99e..96c25b2 100644 --- a/include/effects/SkEmbossMaskFilter.h +++ b/include/effects/SkEmbossMaskFilter.h @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * @@ -6,7 +5,6 @@ * found in the LICENSE file. */ - #ifndef SkEmbossMaskFilter_DEFINED #define SkEmbossMaskFilter_DEFINED @@ -16,7 +14,7 @@ This mask filter creates a 3D emboss look, by specifying a light and blur amount. */ -class SkEmbossMaskFilter : public SkMaskFilter { +class SK_API SkEmbossMaskFilter : public SkMaskFilter { public: struct Light { SkScalar fDirection[3]; // x,y,z @@ -48,4 +46,3 @@ private: }; #endif - diff --git a/include/effects/SkKernel33MaskFilter.h b/include/effects/SkKernel33MaskFilter.h index cfe1265..41e73c9 100644 --- a/include/effects/SkKernel33MaskFilter.h +++ b/include/effects/SkKernel33MaskFilter.h @@ -1,4 +1,3 @@ - /* * Copyright 2008 The Android Open Source Project * @@ -6,13 +5,12 @@ * found in the LICENSE file. */ - #ifndef SkKernel33MaskFilter_DEFINED #define SkKernel33MaskFilter_DEFINED #include "SkMaskFilter.h" -class SkKernel33ProcMaskFilter : public SkMaskFilter { +class SK_API SkKernel33ProcMaskFilter : public SkMaskFilter { public: SkKernel33ProcMaskFilter(unsigned percent256 = 256) : fPercent256(percent256) {} @@ -35,7 +33,7 @@ private: /////////////////////////////////////////////////////////////////////////////// -class SkKernel33MaskFilter : public SkKernel33ProcMaskFilter { +class SK_API SkKernel33MaskFilter : public SkKernel33ProcMaskFilter { public: SkKernel33MaskFilter(const int coeff[3][3], int shift, int percent256 = 256) : SkKernel33ProcMaskFilter(percent256) { diff --git a/include/effects/SkLayerDrawLooper.h b/include/effects/SkLayerDrawLooper.h index d347de7..5196af0 100644 --- a/include/effects/SkLayerDrawLooper.h +++ b/include/effects/SkLayerDrawLooper.h @@ -1,10 +1,10 @@ - /* * Copyright 2011 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ + #ifndef SkLayerDrawLooper_DEFINED #define SkLayerDrawLooper_DEFINED @@ -133,5 +133,4 @@ private: typedef SkDrawLooper INHERITED; }; - #endif diff --git a/include/effects/SkLayerRasterizer.h b/include/effects/SkLayerRasterizer.h index f3149e6..7a1ef74 100644 --- a/include/effects/SkLayerRasterizer.h +++ b/include/effects/SkLayerRasterizer.h @@ -16,7 +16,7 @@ class SkPaint; -class SkLayerRasterizer : public SkRasterizer { +class SK_API SkLayerRasterizer : public SkRasterizer { public: SkLayerRasterizer(); virtual ~SkLayerRasterizer(); diff --git a/include/effects/SkMatrixConvolutionImageFilter.h b/include/effects/SkMatrixConvolutionImageFilter.h index f6e96f2..f7440cd 100644 --- a/include/effects/SkMatrixConvolutionImageFilter.h +++ b/include/effects/SkMatrixConvolutionImageFilter.h @@ -19,7 +19,7 @@ effects such as sharpening, blurring, edge detection, etc. */ -class SkMatrixConvolutionImageFilter : public SkSingleInputImageFilter { +class SK_API SkMatrixConvolutionImageFilter : public SkSingleInputImageFilter { public: /*! \enum TileMode */ enum TileMode { diff --git a/include/effects/SkPaintFlagsDrawFilter.h b/include/effects/SkPaintFlagsDrawFilter.h index 775cb91..fbf1807 100644 --- a/include/effects/SkPaintFlagsDrawFilter.h +++ b/include/effects/SkPaintFlagsDrawFilter.h @@ -1,4 +1,3 @@ - /* * Copyright 2008 The Android Open Source Project * @@ -6,13 +5,12 @@ * found in the LICENSE file. */ - #ifndef SkPaintFlagsDrawFilter_DEFINED #define SkPaintFlagsDrawFilter_DEFINED #include "SkDrawFilter.h" -class SkPaintFlagsDrawFilter : public SkDrawFilter { +class SK_API SkPaintFlagsDrawFilter : public SkDrawFilter { public: SkPaintFlagsDrawFilter(uint32_t clearFlags, uint32_t setFlags); @@ -25,4 +23,3 @@ private: }; #endif - diff --git a/include/effects/SkPixelXorXfermode.h b/include/effects/SkPixelXorXfermode.h index e991108..53f1210 100644 --- a/include/effects/SkPixelXorXfermode.h +++ b/include/effects/SkPixelXorXfermode.h @@ -1,4 +1,3 @@ - /* * Copyright 2007 The Android Open Source Project * @@ -6,7 +5,6 @@ * found in the LICENSE file. */ - #ifndef SkPixelXorXfermode_DEFINED #define SkPixelXorXfermode_DEFINED @@ -17,7 +15,7 @@ this proc *always* returns an opaque color (alpha == 255). Thus it is not really usefull for operating on blended colors. */ -class SkPixelXorXfermode : public SkXfermode { +class SK_API SkPixelXorXfermode : public SkXfermode { public: SkPixelXorXfermode(SkColor opColor) : fOpColor(opColor) {} diff --git a/include/effects/SkPorterDuff.h b/include/effects/SkPorterDuff.h index 8308f3c..1bba171 100644 --- a/include/effects/SkPorterDuff.h +++ b/include/effects/SkPorterDuff.h @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * @@ -6,7 +5,6 @@ * found in the LICENSE file. */ - #ifndef SkPorterDuff_DEFINED #define SkPorterDuff_DEFINED @@ -17,7 +15,7 @@ class SkXfermode; /** DEPRECATED - use SkXfermode::Mode instead */ -class SkPorterDuff { +class SK_API SkPorterDuff { public: /** List of predefined xfermodes. In general, the algebra for the modes uses the following symbols: @@ -81,4 +79,3 @@ public: }; #endif - diff --git a/include/effects/SkStippleMaskFilter.h b/include/effects/SkStippleMaskFilter.h index 9acd5e5..b5d162e 100644 --- a/include/effects/SkStippleMaskFilter.h +++ b/include/effects/SkStippleMaskFilter.h @@ -11,9 +11,9 @@ #include "SkMaskFilter.h" /** - * Simple MaskFilter that creates a screen door stipple pattern + * Simple MaskFilter that creates a screen door stipple pattern. */ -class SkStippleMaskFilter : public SkMaskFilter { +class SK_API SkStippleMaskFilter : public SkMaskFilter { public: SkStippleMaskFilter() : INHERITED() { } diff --git a/include/effects/SkTableMaskFilter.h b/include/effects/SkTableMaskFilter.h index 656eaba..c407b40 100644 --- a/include/effects/SkTableMaskFilter.h +++ b/include/effects/SkTableMaskFilter.h @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * @@ -6,7 +5,6 @@ * found in the LICENSE file. */ - #ifndef SkTableMaskFilter_DEFINED #define SkTableMaskFilter_DEFINED @@ -18,7 +16,7 @@ Applies a table lookup on each of the alpha values in the mask. Helper methods create some common tables (e.g. gamma, clipping) */ -class SkTableMaskFilter : public SkMaskFilter { +class SK_API SkTableMaskFilter : public SkMaskFilter { public: SkTableMaskFilter(); SkTableMaskFilter(const uint8_t table[256]); @@ -64,4 +62,3 @@ private: }; #endif - diff --git a/include/effects/SkTestImageFilters.h b/include/effects/SkTestImageFilters.h index c31a439..5174856 100755 --- a/include/effects/SkTestImageFilters.h +++ b/include/effects/SkTestImageFilters.h @@ -1,11 +1,10 @@ - #ifndef _SkTestImageFilters_h #define _SkTestImageFilters_h #include "SkImageFilter.h" #include "SkPoint.h" -class SkOffsetImageFilter : public SkImageFilter { +class SK_API SkOffsetImageFilter : public SkImageFilter { public: SkOffsetImageFilter(SkScalar dx, SkScalar dy) : INHERITED(0) { fOffset.set(dx, dy); @@ -27,7 +26,7 @@ private: typedef SkImageFilter INHERITED; }; -class SkComposeImageFilter : public SkImageFilter { +class SK_API SkComposeImageFilter : public SkImageFilter { public: SkComposeImageFilter(SkImageFilter* outer, SkImageFilter* inner) : INHERITED(2, outer, inner) {} virtual ~SkComposeImageFilter(); @@ -47,7 +46,7 @@ private: #include "SkXfermode.h" -class SkMergeImageFilter : public SkImageFilter { +class SK_API SkMergeImageFilter : public SkImageFilter { public: SkMergeImageFilter(SkImageFilter* first, SkImageFilter* second, SkXfermode::Mode = SkXfermode::kSrcOver_Mode); @@ -82,7 +81,7 @@ private: /////////////////////////////////////////////////////////////////////////////// // Fun mode that scales down (only) and then scales back up to look pixelated -class SkDownSampleImageFilter : public SkImageFilter { +class SK_API SkDownSampleImageFilter : public SkImageFilter { public: SkDownSampleImageFilter(SkScalar scale) : INHERITED(0), fScale(scale) {} diff --git a/include/effects/SkTransparentShader.h b/include/effects/SkTransparentShader.h index 20bb51a..74187f7 100644 --- a/include/effects/SkTransparentShader.h +++ b/include/effects/SkTransparentShader.h @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * @@ -6,20 +5,19 @@ * found in the LICENSE file. */ - #ifndef SkTransparentShader_DEFINED #define SkTransparentShader_DEFINED #include "SkShader.h" -class SkTransparentShader : public SkShader { +class SK_API SkTransparentShader : public SkShader { public: SkTransparentShader() {} virtual uint32_t getFlags() SK_OVERRIDE; - virtual bool setContext( const SkBitmap& device, - const SkPaint& paint, - const SkMatrix& matrix) SK_OVERRIDE; + virtual bool setContext(const SkBitmap& device, + const SkPaint& paint, + const SkMatrix& matrix) SK_OVERRIDE; virtual void shadeSpan(int x, int y, SkPMColor[], int count) SK_OVERRIDE; virtual void shadeSpan16(int x, int y, uint16_t span[], int count) SK_OVERRIDE; @@ -36,4 +34,3 @@ private: }; #endif -