| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
| 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 SkDisplacementMapEffect_DEFINED | 8 #ifndef SkDisplacementMapEffect_DEFINED |
| 9 #define SkDisplacementMapEffect_DEFINED | 9 #define SkDisplacementMapEffect_DEFINED |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 const CropRect* cropRect = NULL); | 29 const CropRect* cropRect = NULL); |
| 30 | 30 |
| 31 ~SkDisplacementMapEffect(); | 31 ~SkDisplacementMapEffect(); |
| 32 | 32 |
| 33 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDisplacementMapEffect) | 33 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDisplacementMapEffect) |
| 34 | 34 |
| 35 virtual bool onFilterImage(Proxy* proxy, | 35 virtual bool onFilterImage(Proxy* proxy, |
| 36 const SkBitmap& src, | 36 const SkBitmap& src, |
| 37 const SkMatrix& ctm, | 37 const SkMatrix& ctm, |
| 38 SkBitmap* dst, | 38 SkBitmap* dst, |
| 39 SkIPoint* offset) SK_OVERRIDE; | 39 SkIPoint* offset) const SK_OVERRIDE; |
| 40 virtual void computeFastBounds(const SkRect& src, SkRect* dst) const SK_OVER
RIDE; | 40 virtual void computeFastBounds(const SkRect& src, SkRect* dst) const SK_OVER
RIDE; |
| 41 | 41 |
| 42 virtual bool onFilterBounds(const SkIRect& src, const SkMatrix&, | 42 virtual bool onFilterBounds(const SkIRect& src, const SkMatrix&, |
| 43 SkIRect* dst) const SK_OVERRIDE; | 43 SkIRect* dst) const SK_OVERRIDE; |
| 44 | 44 |
| 45 #if SK_SUPPORT_GPU | 45 #if SK_SUPPORT_GPU |
| 46 virtual bool canFilterImageGPU() const SK_OVERRIDE { return true; } | 46 virtual bool canFilterImageGPU() const SK_OVERRIDE { return true; } |
| 47 virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const SkMatri
x& ctm, | 47 virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const SkMatri
x& ctm, |
| 48 SkBitmap* result, SkIPoint* offset) SK_OVERRIDE; | 48 SkBitmap* result, SkIPoint* offset) const SK_OVE
RRIDE; |
| 49 #endif | 49 #endif |
| 50 | 50 |
| 51 protected: | 51 protected: |
| 52 explicit SkDisplacementMapEffect(SkReadBuffer& buffer); | 52 explicit SkDisplacementMapEffect(SkReadBuffer& buffer); |
| 53 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; | 53 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
| 54 | 54 |
| 55 private: | 55 private: |
| 56 ChannelSelectorType fXChannelSelector; | 56 ChannelSelectorType fXChannelSelector; |
| 57 ChannelSelectorType fYChannelSelector; | 57 ChannelSelectorType fYChannelSelector; |
| 58 SkScalar fScale; | 58 SkScalar fScale; |
| 59 typedef SkImageFilter INHERITED; | 59 typedef SkImageFilter INHERITED; |
| 60 SkImageFilter* getDisplacementInput() { return getInput(0); } | |
| 61 SkImageFilter* getColorInput() { return getInput(1); } | |
| 62 const SkImageFilter* getDisplacementInput() const { return getInput(0); } | 60 const SkImageFilter* getDisplacementInput() const { return getInput(0); } |
| 63 const SkImageFilter* getColorInput() const { return getInput(1); } | 61 const SkImageFilter* getColorInput() const { return getInput(1); } |
| 64 }; | 62 }; |
| 65 | 63 |
| 66 #endif | 64 #endif |
| OLD | NEW |