| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMatrixConvolutionImage
Filter) | 55 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMatrixConvolutionImage
Filter) |
| 56 | 56 |
| 57 protected: | 57 protected: |
| 58 SkMatrixConvolutionImageFilter(SkFlattenableReadBuffer& buffer); | 58 SkMatrixConvolutionImageFilter(SkFlattenableReadBuffer& buffer); |
| 59 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; | 59 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; |
| 60 | 60 |
| 61 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&, | 61 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&, |
| 62 SkBitmap* result, SkIPoint* loc) SK_OVERRIDE; | 62 SkBitmap* result, SkIPoint* loc) SK_OVERRIDE; |
| 63 | 63 |
| 64 #if SK_SUPPORT_GPU | 64 #if SK_SUPPORT_GPU |
| 65 virtual bool asNewEffect(GrEffectRef** effect, GrTexture*) const SK_OVERRIDE
; | 65 virtual bool asNewEffect(GrEffectRef** effect, GrTexture*, const SkIPoint& o
ffset) const SK_OVERRIDE; |
| 66 #endif | 66 #endif |
| 67 | 67 |
| 68 private: | 68 private: |
| 69 SkISize fKernelSize; | 69 SkISize fKernelSize; |
| 70 SkScalar* fKernel; | 70 SkScalar* fKernel; |
| 71 SkScalar fGain; | 71 SkScalar fGain; |
| 72 SkScalar fBias; | 72 SkScalar fBias; |
| 73 SkIPoint fTarget; | 73 SkIPoint fTarget; |
| 74 TileMode fTileMode; | 74 TileMode fTileMode; |
| 75 bool fConvolveAlpha; | 75 bool fConvolveAlpha; |
| 76 typedef SkImageFilter INHERITED; | 76 typedef SkImageFilter INHERITED; |
| 77 | 77 |
| 78 template <class PixelFetcher, bool convolveAlpha> | 78 template <class PixelFetcher, bool convolveAlpha> |
| 79 void filterPixels(const SkBitmap& src, SkBitmap* result, const SkIRect& rect
); | 79 void filterPixels(const SkBitmap& src, SkBitmap* result, const SkIRect& rect
); |
| 80 template <class PixelFetcher> | 80 template <class PixelFetcher> |
| 81 void filterPixels(const SkBitmap& src, SkBitmap* result, const SkIRect& rect
); | 81 void filterPixels(const SkBitmap& src, SkBitmap* result, const SkIRect& rect
); |
| 82 void filterInteriorPixels(const SkBitmap& src, SkBitmap* result, const SkIRe
ct& rect); | 82 void filterInteriorPixels(const SkBitmap& src, SkBitmap* result, const SkIRe
ct& rect); |
| 83 void filterBorderPixels(const SkBitmap& src, SkBitmap* result, const SkIRect
& rect); | 83 void filterBorderPixels(const SkBitmap& src, SkBitmap* result, const SkIRect
& rect); |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 #endif | 86 #endif |
| OLD | NEW |