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

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

Issue 1019493002: Remove uniqueID from all filter serialization. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Null out fUniqueID deserialization Created 5 years, 9 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/SkTileImageFilter.h ('k') | samplecode/SampleFilterFuzz.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 The Android Open Source Project 2 * Copyright 2013 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 #ifndef SkXfermodeImageFilter_DEFINED 8 #ifndef SkXfermodeImageFilter_DEFINED
9 #define SkXfermodeImageFilter_DEFINED 9 #define SkXfermodeImageFilter_DEFINED
10 10
11 #include "SkImageFilter.h" 11 #include "SkImageFilter.h"
12 12
13 class SkBitmap; 13 class SkBitmap;
14 class SkXfermode; 14 class SkXfermode;
15 15
16 class SK_API SkXfermodeImageFilter : public SkImageFilter { 16 class SK_API SkXfermodeImageFilter : public SkImageFilter {
17 /** 17 /**
18 * This filter takes an xfermode, and uses it to composite the foreground 18 * This filter takes an xfermode, and uses it to composite the foreground
19 * over the background. If foreground or background is NULL, the input 19 * over the background. If foreground or background is NULL, the input
20 * bitmap (src) is used instead. 20 * bitmap (src) is used instead.
21 */ 21 */
22 22
23 public: 23 public:
24 virtual ~SkXfermodeImageFilter(); 24 virtual ~SkXfermodeImageFilter();
25 25
26 static SkXfermodeImageFilter* Create(SkXfermode* mode, SkImageFilter* backgr ound, 26 static SkXfermodeImageFilter* Create(SkXfermode* mode, SkImageFilter* backgr ound,
27 SkImageFilter* foreground = NULL, 27 SkImageFilter* foreground = NULL,
28 const CropRect* cropRect = NULL, 28 const CropRect* cropRect = NULL) {
29 uint32_t uniqueID = 0) {
30 SkImageFilter* inputs[2] = { background, foreground }; 29 SkImageFilter* inputs[2] = { background, foreground };
31 return SkNEW_ARGS(SkXfermodeImageFilter, (mode, inputs, cropRect, unique ID)); 30 return SkNEW_ARGS(SkXfermodeImageFilter, (mode, inputs, cropRect));
32 } 31 }
33 32
34 SK_TO_STRING_OVERRIDE() 33 SK_TO_STRING_OVERRIDE()
35 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkXfermodeImageFilter) 34 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkXfermodeImageFilter)
36 35
37 virtual bool onFilterImage(Proxy* proxy, 36 virtual bool onFilterImage(Proxy* proxy,
38 const SkBitmap& src, 37 const SkBitmap& src,
39 const Context& ctx, 38 const Context& ctx,
40 SkBitmap* dst, 39 SkBitmap* dst,
41 SkIPoint* offset) const SK_OVERRIDE; 40 SkIPoint* offset) const SK_OVERRIDE;
42 #if SK_SUPPORT_GPU 41 #if SK_SUPPORT_GPU
43 bool canFilterImageGPU() const SK_OVERRIDE; 42 bool canFilterImageGPU() const SK_OVERRIDE;
44 virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context & ctx, 43 virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context & ctx,
45 SkBitmap* result, SkIPoint* offset) const SK_OVE RRIDE; 44 SkBitmap* result, SkIPoint* offset) const SK_OVE RRIDE;
46 #endif 45 #endif
47 46
48 protected: 47 protected:
49 SkXfermodeImageFilter(SkXfermode* mode, SkImageFilter* inputs[2], 48 SkXfermodeImageFilter(SkXfermode* mode, SkImageFilter* inputs[2],
50 const CropRect* cropRect, uint32_t uniqueID); 49 const CropRect* cropRect);
51 void flatten(SkWriteBuffer&) const SK_OVERRIDE; 50 void flatten(SkWriteBuffer&) const SK_OVERRIDE;
52 51
53 private: 52 private:
54 SkXfermode* fMode; 53 SkXfermode* fMode;
55 typedef SkImageFilter INHERITED; 54 typedef SkImageFilter INHERITED;
56 }; 55 };
57 56
58 #endif 57 #endif
OLDNEW
« no previous file with comments | « include/effects/SkTileImageFilter.h ('k') | samplecode/SampleFilterFuzz.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698