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

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

Issue 503833002: Reimplement deserialization of SkImageFilter's uniqueID. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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/core/SkImageFilter.h ('k') | include/effects/SkColorFilterImageFilter.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 2011 The Android Open Source Project 2 * Copyright 2011 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 SkBlurImageFilter_DEFINED 8 #ifndef SkBlurImageFilter_DEFINED
9 #define SkBlurImageFilter_DEFINED 9 #define SkBlurImageFilter_DEFINED
10 10
11 #include "SkImageFilter.h" 11 #include "SkImageFilter.h"
12 #include "SkSize.h" 12 #include "SkSize.h"
13 13
14 class SK_API SkBlurImageFilter : public SkImageFilter { 14 class SK_API SkBlurImageFilter : public SkImageFilter {
15 public: 15 public:
16 static SkBlurImageFilter* Create(SkScalar sigmaX, 16 static SkBlurImageFilter* Create(SkScalar sigmaX,
17 SkScalar sigmaY, 17 SkScalar sigmaY,
18 SkImageFilter* input = NULL, 18 SkImageFilter* input = NULL,
19 const CropRect* cropRect = NULL) { 19 const CropRect* cropRect = NULL, uint32_t u niqueID = 0) {
20 return SkNEW_ARGS(SkBlurImageFilter, (sigmaX, sigmaY, input, cropRect)); 20 return SkNEW_ARGS(SkBlurImageFilter, (sigmaX, sigmaY, input, cropRect, u niqueID));
21 } 21 }
22 22
23 virtual void computeFastBounds(const SkRect&, SkRect*) const SK_OVERRIDE; 23 virtual void computeFastBounds(const SkRect&, SkRect*) const SK_OVERRIDE;
24 24
25 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBlurImageFilter) 25 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBlurImageFilter)
26 26
27 protected: 27 protected:
28 SkBlurImageFilter(SkScalar sigmaX, 28 SkBlurImageFilter(SkScalar sigmaX,
29 SkScalar sigmaY, 29 SkScalar sigmaY,
30 SkImageFilter* input, 30 SkImageFilter* input,
31 const CropRect* cropRect); 31 const CropRect* cropRect,
32 uint32_t uniqueID);
32 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING 33 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
33 explicit SkBlurImageFilter(SkReadBuffer& buffer); 34 explicit SkBlurImageFilter(SkReadBuffer& buffer);
34 #endif 35 #endif
35 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; 36 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
36 37
37 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, 38 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&,
38 SkBitmap* result, SkIPoint* offset) const SK_OVER RIDE; 39 SkBitmap* result, SkIPoint* offset) const SK_OVER RIDE;
39 virtual bool onFilterBounds(const SkIRect& src, const SkMatrix&, 40 virtual bool onFilterBounds(const SkIRect& src, const SkMatrix&,
40 SkIRect* dst) const SK_OVERRIDE; 41 SkIRect* dst) const SK_OVERRIDE;
41 42
42 bool canFilterImageGPU() const SK_OVERRIDE { return true; } 43 bool canFilterImageGPU() const SK_OVERRIDE { return true; }
43 virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context & ctx, 44 virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context & ctx,
44 SkBitmap* result, SkIPoint* offset) const SK_OVE RRIDE; 45 SkBitmap* result, SkIPoint* offset) const SK_OVE RRIDE;
45 46
46 private: 47 private:
47 SkSize fSigma; 48 SkSize fSigma;
48 typedef SkImageFilter INHERITED; 49 typedef SkImageFilter INHERITED;
49 }; 50 };
50 51
51 #endif 52 #endif
OLDNEW
« no previous file with comments | « include/core/SkImageFilter.h ('k') | include/effects/SkColorFilterImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698