OLD | NEW |
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" |
(...skipping 30 matching lines...) Expand all Loading... |
41 shadowMode, input, cropRect,
uniqueID)); | 41 shadowMode, input, cropRect,
uniqueID)); |
42 } | 42 } |
43 | 43 |
44 static SkDropShadowImageFilter* Create(SkScalar dx, SkScalar dy, | 44 static SkDropShadowImageFilter* Create(SkScalar dx, SkScalar dy, |
45 SkScalar sigmaX, SkScalar sigmaY, SkC
olor color, | 45 SkScalar sigmaX, SkScalar sigmaY, SkC
olor color, |
46 ShadowMode shadowMode) { | 46 ShadowMode shadowMode) { |
47 return SkNEW_ARGS(SkDropShadowImageFilter, (dx, dy, sigmaX, sigmaY, colo
r, | 47 return SkNEW_ARGS(SkDropShadowImageFilter, (dx, dy, sigmaX, sigmaY, colo
r, |
48 shadowMode, NULL, NULL, 0)); | 48 shadowMode, NULL, NULL, 0)); |
49 } | 49 } |
50 | 50 |
51 virtual void computeFastBounds(const SkRect&, SkRect*) const SK_OVERRIDE; | 51 void computeFastBounds(const SkRect&, SkRect*) const SK_OVERRIDE; |
52 SK_TO_STRING_OVERRIDE() | 52 SK_TO_STRING_OVERRIDE() |
53 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDropShadowImageFilter) | 53 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDropShadowImageFilter) |
54 | 54 |
55 protected: | 55 protected: |
56 SkDropShadowImageFilter(SkScalar dx, SkScalar dy, SkScalar sigmaX, SkScalar
sigmaY, SkColor, | 56 SkDropShadowImageFilter(SkScalar dx, SkScalar dy, SkScalar sigmaX, SkScalar
sigmaY, SkColor, |
57 ShadowMode shadowMode, SkImageFilter* input, const C
ropRect* cropRect, | 57 ShadowMode shadowMode, SkImageFilter* input, const C
ropRect* cropRect, |
58 uint32_t uniqueID); | 58 uint32_t uniqueID); |
59 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; | 59 void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
60 virtual bool onFilterImage(Proxy*, const SkBitmap& source, const Context&, S
kBitmap* result, SkIPoint* loc) const SK_OVERRIDE; | 60 bool onFilterImage(Proxy*, const SkBitmap& source, const Context&, SkBitmap*
result, SkIPoint* loc) const SK_OVERRIDE; |
61 virtual bool onFilterBounds(const SkIRect& src, const SkMatrix&, | 61 virtual bool onFilterBounds(const SkIRect& src, const SkMatrix&, |
62 SkIRect* dst) const SK_OVERRIDE; | 62 SkIRect* dst) const SK_OVERRIDE; |
63 | 63 |
64 private: | 64 private: |
65 SkScalar fDx, fDy, fSigmaX, fSigmaY; | 65 SkScalar fDx, fDy, fSigmaX, fSigmaY; |
66 SkColor fColor; | 66 SkColor fColor; |
67 ShadowMode fShadowMode; | 67 ShadowMode fShadowMode; |
68 typedef SkImageFilter INHERITED; | 68 typedef SkImageFilter INHERITED; |
69 }; | 69 }; |
OLD | NEW |