OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The Android Open Source Project | 2 * Copyright 2012 The Android Open Source Project |
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 #ifndef SkMatrixConvolutionImageFilter_DEFINED | 8 #ifndef SkMatrixConvolutionImageFilter_DEFINED |
9 #define SkMatrixConvolutionImageFilter_DEFINED | 9 #define SkMatrixConvolutionImageFilter_DEFINED |
10 | 10 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 @param cropRect The rectangle to which the output processing will
be limited. | 53 @param cropRect The rectangle to which the output processing will
be limited. |
54 */ | 54 */ |
55 static SkMatrixConvolutionImageFilter* Create(const SkISize& kernelSize, | 55 static SkMatrixConvolutionImageFilter* Create(const SkISize& kernelSize, |
56 const SkScalar* kernel, | 56 const SkScalar* kernel, |
57 SkScalar gain, | 57 SkScalar gain, |
58 SkScalar bias, | 58 SkScalar bias, |
59 const SkIPoint& kernelOffset, | 59 const SkIPoint& kernelOffset, |
60 TileMode tileMode, | 60 TileMode tileMode, |
61 bool convolveAlpha, | 61 bool convolveAlpha, |
62 SkImageFilter* input = NULL, | 62 SkImageFilter* input = NULL, |
63 const CropRect* cropRect = NUL
L, | 63 const CropRect* cropRect = NUL
L); |
64 uint32_t uniqueID = 0); | |
65 | 64 |
66 SK_TO_STRING_OVERRIDE() | 65 SK_TO_STRING_OVERRIDE() |
67 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMatrixConvolutionImage
Filter) | 66 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMatrixConvolutionImage
Filter) |
68 | 67 |
69 protected: | 68 protected: |
70 SkMatrixConvolutionImageFilter(const SkISize& kernelSize, | 69 SkMatrixConvolutionImageFilter(const SkISize& kernelSize, |
71 const SkScalar* kernel, | 70 const SkScalar* kernel, |
72 SkScalar gain, | 71 SkScalar gain, |
73 SkScalar bias, | 72 SkScalar bias, |
74 const SkIPoint& kernelOffset, | 73 const SkIPoint& kernelOffset, |
75 TileMode tileMode, | 74 TileMode tileMode, |
76 bool convolveAlpha, | 75 bool convolveAlpha, |
77 SkImageFilter* input, | 76 SkImageFilter* input, |
78 const CropRect* cropRect, | 77 const CropRect* cropRect); |
79 uint32_t uniqueID); | |
80 void flatten(SkWriteBuffer&) const SK_OVERRIDE; | 78 void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
81 | 79 |
82 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, | 80 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, |
83 SkBitmap* result, SkIPoint* loc) const SK_OVERRID
E; | 81 SkBitmap* result, SkIPoint* loc) const SK_OVERRID
E; |
84 bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*) const SK_OVER
RIDE; | 82 bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*) const SK_OVER
RIDE; |
85 | 83 |
86 | 84 |
87 #if SK_SUPPORT_GPU | 85 #if SK_SUPPORT_GPU |
88 virtual bool asFragmentProcessor(GrFragmentProcessor**, GrTexture*, const Sk
Matrix&, | 86 virtual bool asFragmentProcessor(GrFragmentProcessor**, GrTexture*, const Sk
Matrix&, |
89 const SkIRect& bounds) const SK_OVERRIDE; | 87 const SkIRect& bounds) const SK_OVERRIDE; |
(...skipping 23 matching lines...) Expand all Loading... |
113 SkBitmap* result, | 111 SkBitmap* result, |
114 const SkIRect& rect, | 112 const SkIRect& rect, |
115 const SkIRect& bounds) const; | 113 const SkIRect& bounds) const; |
116 void filterBorderPixels(const SkBitmap& src, | 114 void filterBorderPixels(const SkBitmap& src, |
117 SkBitmap* result, | 115 SkBitmap* result, |
118 const SkIRect& rect, | 116 const SkIRect& rect, |
119 const SkIRect& bounds) const; | 117 const SkIRect& bounds) const; |
120 }; | 118 }; |
121 | 119 |
122 #endif | 120 #endif |
OLD | NEW |