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 SkTileImageFilter_DEFINED | 8 #ifndef SkTileImageFilter_DEFINED |
9 #define SkTileImageFilter_DEFINED | 9 #define SkTileImageFilter_DEFINED |
10 | 10 |
11 #include "SkImageFilter.h" | 11 #include "SkImageFilter.h" |
12 | 12 |
13 class SK_API SkTileImageFilter : public SkImageFilter { | 13 class SK_API SkTileImageFilter : public SkImageFilter { |
14 typedef SkImageFilter INHERITED; | |
15 | |
16 public: | 14 public: |
17 /** Create a tile image filter | 15 /** Create a tile image filter |
18 @param src Defines the pixels to tile | 16 @param src Defines the pixels to tile |
19 @param dst Defines the pixels where tiles are drawn | 17 @param dst Defines the pixels where tiles are drawn |
20 @param input Input from which the subregion defined by srcRect will b
e tiled | 18 @param input Input from which the subregion defined by srcRect will b
e tiled |
21 */ | 19 */ |
22 static SkImageFilter* Create(const SkRect& src, const SkRect& dst, SkImageFi
lter* input); | 20 static SkImageFilter* Create(const SkRect& src, const SkRect& dst, SkImageFi
lter* input); |
23 | 21 |
24 bool onFilterImageDeprecated(Proxy* proxy, const SkBitmap& src, const Contex
t& ctx, | |
25 SkBitmap* dst, SkIPoint* offset) const override
; | |
26 SkIRect onFilterBounds(const SkIRect& src, const SkMatrix&, MapDirection) co
nst override; | 22 SkIRect onFilterBounds(const SkIRect& src, const SkMatrix&, MapDirection) co
nst override; |
27 SkIRect onFilterNodeBounds(const SkIRect&, const SkMatrix&, MapDirection) co
nst override; | 23 SkIRect onFilterNodeBounds(const SkIRect&, const SkMatrix&, MapDirection) co
nst override; |
28 SkRect computeFastBounds(const SkRect& src) const override; | 24 SkRect computeFastBounds(const SkRect& src) const override; |
29 | 25 |
30 SK_TO_STRING_OVERRIDE() | 26 SK_TO_STRING_OVERRIDE() |
31 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTileImageFilter) | 27 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTileImageFilter) |
32 | 28 |
33 protected: | 29 protected: |
34 void flatten(SkWriteBuffer& buffer) const override; | 30 void flatten(SkWriteBuffer& buffer) const override; |
35 | 31 |
| 32 sk_sp<SkSpecialImage> onFilterImage(SkSpecialImage* source, const Context&, |
| 33 SkIPoint* offset) const override; |
| 34 |
36 private: | 35 private: |
37 SkTileImageFilter(const SkRect& srcRect, const SkRect& dstRect, SkImageFilte
r* input) | 36 SkTileImageFilter(const SkRect& srcRect, const SkRect& dstRect, SkImageFilte
r* input) |
38 : INHERITED(1, &input, NULL), fSrcRect(srcRect), fDstRect(dstRect) {} | 37 : INHERITED(1, &input, NULL), fSrcRect(srcRect), fDstRect(dstRect) {} |
39 | 38 |
40 SkRect fSrcRect; | 39 SkRect fSrcRect; |
41 SkRect fDstRect; | 40 SkRect fDstRect; |
| 41 |
| 42 typedef SkImageFilter INHERITED; |
42 }; | 43 }; |
43 | 44 |
44 #endif | 45 #endif |
OLD | NEW |