| 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**, GrTexture*) const SK_OVERRIDE; | 65 virtual bool canFilterImageGPU() const SK_OVERRIDE; |
| 66 virtual GrEffectRef* asNewEffect(GrTexture*) const SK_OVERRIDE; |
| 66 #endif | 67 #endif |
| 67 | 68 |
| 68 private: | 69 private: |
| 69 SkISize fKernelSize; | 70 SkISize fKernelSize; |
| 70 SkScalar* fKernel; | 71 SkScalar* fKernel; |
| 71 SkScalar fGain; | 72 SkScalar fGain; |
| 72 SkScalar fBias; | 73 SkScalar fBias; |
| 73 SkIPoint fTarget; | 74 SkIPoint fTarget; |
| 74 TileMode fTileMode; | 75 TileMode fTileMode; |
| 75 bool fConvolveAlpha; | 76 bool fConvolveAlpha; |
| 76 typedef SkImageFilter INHERITED; | 77 typedef SkImageFilter INHERITED; |
| 77 | 78 |
| 78 template <class PixelFetcher, bool convolveAlpha> | 79 template <class PixelFetcher, bool convolveAlpha> |
| 79 void filterPixels(const SkBitmap& src, SkBitmap* result, const SkIRect& rect
); | 80 void filterPixels(const SkBitmap& src, SkBitmap* result, const SkIRect& rect
); |
| 80 template <class PixelFetcher> | 81 template <class PixelFetcher> |
| 81 void filterPixels(const SkBitmap& src, SkBitmap* result, const SkIRect& rect
); | 82 void filterPixels(const SkBitmap& src, SkBitmap* result, const SkIRect& rect
); |
| 82 void filterInteriorPixels(const SkBitmap& src, SkBitmap* result, const SkIRe
ct& rect); | 83 void filterInteriorPixels(const SkBitmap& src, SkBitmap* result, const SkIRe
ct& rect); |
| 83 void filterBorderPixels(const SkBitmap& src, SkBitmap* result, const SkIRect
& rect); | 84 void filterBorderPixels(const SkBitmap& src, SkBitmap* result, const SkIRect
& rect); |
| 84 }; | 85 }; |
| 85 | 86 |
| 86 #endif | 87 #endif |
| OLD | NEW |