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

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

Issue 1308703007: Fix filter primitive bounds computations. (Closed) Base URL: https://skia.googlesource.com/skia.git@saveLayer-bounds-not-transformed
Patch Set: Fix comment style; remove useless param names Created 5 years 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
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; 14 typedef SkImageFilter INHERITED;
15 15
16 public: 16 public:
17 /** Create a tile image filter 17 /** Create a tile image filter
18 @param src Defines the pixels to tile 18 @param src Defines the pixels to tile
19 @param dst Defines the pixels where tiles are drawn 19 @param dst Defines the pixels where tiles are drawn
20 @param input Input from which the subregion defined by srcRect will b e tiled 20 @param input Input from which the subregion defined by srcRect will b e tiled
21 */ 21 */
22 static SkImageFilter* Create(const SkRect& src, const SkRect& dst, SkImageFi lter* input); 22 static SkImageFilter* Create(const SkRect& src, const SkRect& dst, SkImageFi lter* input);
23 23
24 bool onFilterImage(Proxy* proxy, const SkBitmap& src, const Context& ctx, 24 bool onFilterImage(Proxy* proxy, const SkBitmap& src, const Context& ctx,
25 SkBitmap* dst, SkIPoint* offset) const override; 25 SkBitmap* dst, SkIPoint* offset) const override;
26 bool onFilterBounds(const SkIRect& src, const SkMatrix&, 26 bool onFilterBounds(const SkIRect& src, const SkMatrix&,
27 SkIRect* dst) const override; 27 SkIRect* dst) const override;
28 void onFilterNodeBounds(const SkIRect&, const SkMatrix&, SkIRect*, MapDirect ion) const override;
28 void computeFastBounds(const SkRect& src, SkRect* dst) const override; 29 void computeFastBounds(const SkRect& src, SkRect* dst) const override;
29 30
30 SK_TO_STRING_OVERRIDE() 31 SK_TO_STRING_OVERRIDE()
31 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTileImageFilter) 32 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTileImageFilter)
32 33
33 protected: 34 protected:
34 void flatten(SkWriteBuffer& buffer) const override; 35 void flatten(SkWriteBuffer& buffer) const override;
35 36
36 private: 37 private:
37 SkTileImageFilter(const SkRect& srcRect, const SkRect& dstRect, SkImageFilte r* input) 38 SkTileImageFilter(const SkRect& srcRect, const SkRect& dstRect, SkImageFilte r* input)
38 : INHERITED(1, &input, NULL), fSrcRect(srcRect), fDstRect(dstRect) {} 39 : INHERITED(1, &input, NULL), fSrcRect(srcRect), fDstRect(dstRect) {}
39 40
40 SkRect fSrcRect; 41 SkRect fSrcRect;
41 SkRect fDstRect; 42 SkRect fDstRect;
42 }; 43 };
43 44
44 #endif 45 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698