| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 const CropRect* cropRect = NULL); | 61 const CropRect* cropRect = NULL); |
| 62 virtual ~SkMatrixConvolutionImageFilter(); | 62 virtual ~SkMatrixConvolutionImageFilter(); |
| 63 | 63 |
| 64 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMatrixConvolutionImage
Filter) | 64 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMatrixConvolutionImage
Filter) |
| 65 | 65 |
| 66 protected: | 66 protected: |
| 67 SkMatrixConvolutionImageFilter(SkReadBuffer& buffer); | 67 SkMatrixConvolutionImageFilter(SkReadBuffer& buffer); |
| 68 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; | 68 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
| 69 | 69 |
| 70 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&, | 70 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&, |
| 71 SkBitmap* result, SkIPoint* loc) SK_OVERRIDE; | 71 SkBitmap* result, SkIPoint* loc) const SK_OVERRID
E; |
| 72 | 72 |
| 73 #if SK_SUPPORT_GPU | 73 #if SK_SUPPORT_GPU |
| 74 virtual bool asNewEffect(GrEffectRef** effect, | 74 virtual bool asNewEffect(GrEffectRef** effect, |
| 75 GrTexture*, | 75 GrTexture*, |
| 76 const SkMatrix& matrix, | 76 const SkMatrix& matrix, |
| 77 const SkIRect& bounds) const SK_OVERRIDE; | 77 const SkIRect& bounds) const SK_OVERRIDE; |
| 78 #endif | 78 #endif |
| 79 | 79 |
| 80 private: | 80 private: |
| 81 SkISize fKernelSize; | 81 SkISize fKernelSize; |
| 82 SkScalar* fKernel; | 82 SkScalar* fKernel; |
| 83 SkScalar fGain; | 83 SkScalar fGain; |
| 84 SkScalar fBias; | 84 SkScalar fBias; |
| 85 SkIPoint fTarget; | 85 SkIPoint fTarget; |
| 86 TileMode fTileMode; | 86 TileMode fTileMode; |
| 87 bool fConvolveAlpha; | 87 bool fConvolveAlpha; |
| 88 typedef SkImageFilter INHERITED; | 88 typedef SkImageFilter INHERITED; |
| 89 | 89 |
| 90 template <class PixelFetcher, bool convolveAlpha> | 90 template <class PixelFetcher, bool convolveAlpha> |
| 91 void filterPixels(const SkBitmap& src, | 91 void filterPixels(const SkBitmap& src, |
| 92 SkBitmap* result, | 92 SkBitmap* result, |
| 93 const SkIRect& rect, | 93 const SkIRect& rect, |
| 94 const SkIRect& bounds); | 94 const SkIRect& bounds) const; |
| 95 template <class PixelFetcher> | 95 template <class PixelFetcher> |
| 96 void filterPixels(const SkBitmap& src, | 96 void filterPixels(const SkBitmap& src, |
| 97 SkBitmap* result, | 97 SkBitmap* result, |
| 98 const SkIRect& rect, | 98 const SkIRect& rect, |
| 99 const SkIRect& bounds); | 99 const SkIRect& bounds) const; |
| 100 void filterInteriorPixels(const SkBitmap& src, | 100 void filterInteriorPixels(const SkBitmap& src, |
| 101 SkBitmap* result, | 101 SkBitmap* result, |
| 102 const SkIRect& rect, | 102 const SkIRect& rect, |
| 103 const SkIRect& bounds); | 103 const SkIRect& bounds) const; |
| 104 void filterBorderPixels(const SkBitmap& src, | 104 void filterBorderPixels(const SkBitmap& src, |
| 105 SkBitmap* result, | 105 SkBitmap* result, |
| 106 const SkIRect& rect, | 106 const SkIRect& rect, |
| 107 const SkIRect& bounds); | 107 const SkIRect& bounds) const; |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 #endif | 110 #endif |
| OLD | NEW |