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

Side by Side Diff: include/effects/SkDropShadowImageFilter.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/SkDisplacementMapEffect.h ('k') | include/effects/SkLightingImageFilter.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 #include "SkColor.h" 8 #include "SkColor.h"
9 #include "SkImageFilter.h" 9 #include "SkImageFilter.h"
10 #include "SkScalar.h" 10 #include "SkScalar.h"
11 11
12 class SK_API SkDropShadowImageFilter : public SkImageFilter { 12 class SK_API SkDropShadowImageFilter : public SkImageFilter {
13 public: 13 public:
14 static SkDropShadowImageFilter* Create(SkScalar dx, SkScalar dy, 14 static SkDropShadowImageFilter* Create(SkScalar dx, SkScalar dy,
15 SkScalar sigmaX, SkScalar sigmaY, SkC olor color, 15 SkScalar sigmaX, SkScalar sigmaY, SkC olor color,
16 SkImageFilter* input = NULL, 16 SkImageFilter* input = NULL,
17 const CropRect* cropRect = NULL) { 17 const CropRect* cropRect = NULL,
18 uint32_t uniqueID = 0) {
18 return SkNEW_ARGS(SkDropShadowImageFilter, (dx, dy, sigmaX, sigmaY, 19 return SkNEW_ARGS(SkDropShadowImageFilter, (dx, dy, sigmaX, sigmaY,
19 color, input, cropRect)); 20 color, input, cropRect, uniq ueID));
20 } 21 }
21 virtual void computeFastBounds(const SkRect&, SkRect*) const SK_OVERRIDE; 22 virtual void computeFastBounds(const SkRect&, SkRect*) const SK_OVERRIDE;
22 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDropShadowImageFilter) 23 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDropShadowImageFilter)
23 24
24 protected: 25 protected:
25 SkDropShadowImageFilter(SkScalar dx, SkScalar dy, SkScalar sigmaX, SkScalar sigmaY, SkColor, 26 SkDropShadowImageFilter(SkScalar dx, SkScalar dy, SkScalar sigmaX, SkScalar sigmaY, SkColor,
26 SkImageFilter* input, const CropRect* cropRect); 27 SkImageFilter* input, const CropRect* cropRect, uint 32_t uniqueID);
27 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING 28 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
28 explicit SkDropShadowImageFilter(SkReadBuffer&); 29 explicit SkDropShadowImageFilter(SkReadBuffer&);
29 #endif 30 #endif
30 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; 31 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
31 virtual bool onFilterImage(Proxy*, const SkBitmap& source, const Context&, S kBitmap* result, SkIPoint* loc) const SK_OVERRIDE; 32 virtual bool onFilterImage(Proxy*, const SkBitmap& source, const Context&, S kBitmap* result, SkIPoint* loc) const SK_OVERRIDE;
32 virtual bool onFilterBounds(const SkIRect& src, const SkMatrix&, 33 virtual bool onFilterBounds(const SkIRect& src, const SkMatrix&,
33 SkIRect* dst) const SK_OVERRIDE; 34 SkIRect* dst) const SK_OVERRIDE;
34 35
35 private: 36 private:
36 SkScalar fDx, fDy, fSigmaX, fSigmaY; 37 SkScalar fDx, fDy, fSigmaX, fSigmaY;
37 SkColor fColor; 38 SkColor fColor;
38 typedef SkImageFilter INHERITED; 39 typedef SkImageFilter INHERITED;
39 }; 40 };
OLDNEW
« no previous file with comments | « include/effects/SkDisplacementMapEffect.h ('k') | include/effects/SkLightingImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698