| 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 21 matching lines...) Expand all Loading... |
| 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) 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&, |
| 43 SkIRect* dst) const SK_OVERRIDE; |
| 44 |
| 42 #if SK_SUPPORT_GPU | 45 #if SK_SUPPORT_GPU |
| 43 virtual bool canFilterImageGPU() const SK_OVERRIDE { return true; } | 46 virtual bool canFilterImageGPU() const SK_OVERRIDE { return true; } |
| 44 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, |
| 45 SkBitmap* result, SkIPoint* offset) SK_OVERRIDE; | 48 SkBitmap* result, SkIPoint* offset) SK_OVERRIDE; |
| 46 #endif | 49 #endif |
| 47 | 50 |
| 48 protected: | 51 protected: |
| 49 explicit SkDisplacementMapEffect(SkReadBuffer& buffer); | 52 explicit SkDisplacementMapEffect(SkReadBuffer& buffer); |
| 50 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; | 53 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
| 51 | 54 |
| 52 private: | 55 private: |
| 53 ChannelSelectorType fXChannelSelector; | 56 ChannelSelectorType fXChannelSelector; |
| 54 ChannelSelectorType fYChannelSelector; | 57 ChannelSelectorType fYChannelSelector; |
| 55 SkScalar fScale; | 58 SkScalar fScale; |
| 56 typedef SkImageFilter INHERITED; | 59 typedef SkImageFilter INHERITED; |
| 57 SkImageFilter* getDisplacementInput() { return getInput(0); } | 60 SkImageFilter* getDisplacementInput() { return getInput(0); } |
| 58 SkImageFilter* getColorInput() { return getInput(1); } | 61 SkImageFilter* getColorInput() { return getInput(1); } |
| 59 const SkImageFilter* getDisplacementInput() const { return getInput(0); } | 62 const SkImageFilter* getDisplacementInput() const { return getInput(0); } |
| 60 const SkImageFilter* getColorInput() const { return getInput(1); } | 63 const SkImageFilter* getColorInput() const { return getInput(1); } |
| 61 }; | 64 }; |
| 62 | 65 |
| 63 #endif | 66 #endif |
| OLD | NEW |