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

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

Issue 503833002: Reimplement deserialization of SkImageFilter's uniqueID. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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 | « include/effects/SkRectShaderImageFilter.h ('k') | include/effects/SkXfermodeImageFilter.h » ('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; 14 typedef SkImageFilter INHERITED;
15 15
16 public: 16 public:
17 /** Create a tile image filter 17 /** Create a tile image filter
18 @param srcRect Defines the pixels to tile 18 @param srcRect Defines the pixels to tile
19 @param dstRect Defines the pixels where tiles are drawn 19 @param dstRect 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 SkTileImageFilter* Create(const SkRect& srcRect, const SkRect& dstRec t, 22 static SkTileImageFilter* Create(const SkRect& srcRect, const SkRect& dstRec t,
23 SkImageFilter* input); 23 SkImageFilter* input, uint32_t uniqueID = 0 );
24 24
25 virtual bool onFilterImage(Proxy* proxy, const SkBitmap& src, const Context& ctx, 25 virtual bool onFilterImage(Proxy* proxy, const SkBitmap& src, const Context& ctx,
26 SkBitmap* dst, SkIPoint* offset) const SK_OVERRID E; 26 SkBitmap* dst, SkIPoint* offset) const SK_OVERRID E;
27 virtual bool onFilterBounds(const SkIRect& src, const SkMatrix&, 27 virtual bool onFilterBounds(const SkIRect& src, const SkMatrix&,
28 SkIRect* dst) const SK_OVERRIDE; 28 SkIRect* dst) const SK_OVERRIDE;
29 29
30 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTileImageFilter) 30 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTileImageFilter)
31 31
32 protected: 32 protected:
33 SkTileImageFilter(const SkRect& srcRect, const SkRect& dstRect, SkImageFilte r* input) 33 SkTileImageFilter(const SkRect& srcRect, const SkRect& dstRect, SkImageFilte r* input, uint32_t uniqueID)
34 : INHERITED(1, &input), fSrcRect(srcRect), fDstRect(dstRect) {} 34 : INHERITED(1, &input, NULL, uniqueID), fSrcRect(srcRect), fDstRect(dstR ect) {}
35 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING 35 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
36 explicit SkTileImageFilter(SkReadBuffer& buffer); 36 explicit SkTileImageFilter(SkReadBuffer& buffer);
37 #endif 37 #endif
38 38
39 virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE; 39 virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE;
40 40
41 private: 41 private:
42 SkRect fSrcRect; 42 SkRect fSrcRect;
43 SkRect fDstRect; 43 SkRect fDstRect;
44 }; 44 };
45 45
46 #endif 46 #endif
OLDNEW
« no previous file with comments | « include/effects/SkRectShaderImageFilter.h ('k') | include/effects/SkXfermodeImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698