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 | 8 |
9 #ifndef SkMagnifierImageFilter_DEFINED | 9 #ifndef SkMagnifierImageFilter_DEFINED |
10 #define SkMagnifierImageFilter_DEFINED | 10 #define SkMagnifierImageFilter_DEFINED |
11 | 11 |
12 #include "SkRect.h" | 12 #include "SkRect.h" |
13 #include "SkImageFilter.h" | 13 #include "SkImageFilter.h" |
14 | 14 |
15 class SK_API SkMagnifierImageFilter : public SkImageFilter { | 15 class SK_API SkMagnifierImageFilter : public SkImageFilter { |
16 public: | 16 public: |
17 SkMagnifierImageFilter(SkRect srcRect, SkScalar inset); | 17 SkMagnifierImageFilter(SkRect srcRect, SkScalar inset); |
18 | 18 |
19 #if SK_SUPPORT_GPU | |
20 virtual bool asNewEffect(GrEffectRef** effect, GrTexture* texture, const SkM
atrix& matrix) const SK_OVERRIDE; | |
21 #endif | |
22 | |
23 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMagnifierImageFilter) | 19 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMagnifierImageFilter) |
24 | 20 |
25 protected: | 21 protected: |
26 explicit SkMagnifierImageFilter(SkFlattenableReadBuffer& buffer); | 22 explicit SkMagnifierImageFilter(SkFlattenableReadBuffer& buffer); |
27 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; | 23 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; |
28 | 24 |
29 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&, | 25 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&, |
30 SkBitmap* result, SkIPoint* offset) SK_OVERRIDE; | 26 SkBitmap* result, SkIPoint* offset) SK_OVERRIDE; |
| 27 #if SK_SUPPORT_GPU |
| 28 virtual bool asNewEffect(GrEffectRef** effect, GrTexture* texture, const SkM
atrix& matrix) const SK_OVERRIDE; |
| 29 #endif |
31 | 30 |
32 private: | 31 private: |
33 SkRect fSrcRect; | 32 SkRect fSrcRect; |
34 SkScalar fInset; | 33 SkScalar fInset; |
35 typedef SkImageFilter INHERITED; | 34 typedef SkImageFilter INHERITED; |
36 }; | 35 }; |
37 | 36 |
38 #endif | 37 #endif |
OLD | NEW |