Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: include/effects/SkTileImageFilter.h

Issue 1810693003: Switch SkTileImageFilter over to new onFilterImage interface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/effects/SkTileImageFilter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
OLDNEW
« no previous file with comments | « no previous file | src/effects/SkTileImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698