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

Side by Side Diff: src/effects/SkDropShadowImageFilter.cpp

Issue 1893973002: Outline SkImageFilter Make methods (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT Created 4 years, 8 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 | « src/effects/SkComposeImageFilter.cpp ('k') | src/effects/SkImageSource.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 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 "SkDropShadowImageFilter.h" 8 #include "SkDropShadowImageFilter.h"
9 9
10 #include "SkBlurImageFilter.h" 10 #include "SkBlurImageFilter.h"
11 #include "SkCanvas.h" 11 #include "SkCanvas.h"
12 #include "SkReadBuffer.h" 12 #include "SkReadBuffer.h"
13 #include "SkSpecialImage.h" 13 #include "SkSpecialImage.h"
14 #include "SkSpecialSurface.h" 14 #include "SkSpecialSurface.h"
15 #include "SkWriteBuffer.h" 15 #include "SkWriteBuffer.h"
16 16
17 sk_sp<SkImageFilter> SkDropShadowImageFilter::Make(SkScalar dx, SkScalar dy,
18 SkScalar sigmaX, SkScalar sig maY,
19 SkColor color, ShadowMode sha dowMode,
20 sk_sp<SkImageFilter> input,
21 const CropRect* cropRect) {
22 return sk_sp<SkImageFilter>(new SkDropShadowImageFilter(dx, dy, sigmaX, sigm aY,
23 color, shadowMode,
24 std::move(input),
25 cropRect));
26 }
27
17 SkDropShadowImageFilter::SkDropShadowImageFilter(SkScalar dx, SkScalar dy, 28 SkDropShadowImageFilter::SkDropShadowImageFilter(SkScalar dx, SkScalar dy,
18 SkScalar sigmaX, SkScalar sigma Y, SkColor color, 29 SkScalar sigmaX, SkScalar sigma Y, SkColor color,
19 ShadowMode shadowMode, sk_sp<Sk ImageFilter> input, 30 ShadowMode shadowMode, sk_sp<Sk ImageFilter> input,
20 const CropRect* cropRect) 31 const CropRect* cropRect)
21 : INHERITED(&input, 1, cropRect) 32 : INHERITED(&input, 1, cropRect)
22 , fDx(dx) 33 , fDx(dx)
23 , fDy(dy) 34 , fDy(dy)
24 , fSigmaX(sigmaX) 35 , fSigmaX(sigmaX)
25 , fSigmaY(sigmaY) 36 , fSigmaY(sigmaY)
26 , fColor(color) 37 , fColor(color)
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 "kDrawShadowAndForeground", "kDrawShadowOnly" 163 "kDrawShadowAndForeground", "kDrawShadowOnly"
153 }; 164 };
154 165
155 static_assert(kShadowModeCount == SK_ARRAY_COUNT(gModeStrings), "enum_mismat ch"); 166 static_assert(kShadowModeCount == SK_ARRAY_COUNT(gModeStrings), "enum_mismat ch");
156 167
157 str->appendf(" mode: %s", gModeStrings[fShadowMode]); 168 str->appendf(" mode: %s", gModeStrings[fShadowMode]);
158 169
159 str->append(")"); 170 str->append(")");
160 } 171 }
161 #endif 172 #endif
OLDNEW
« no previous file with comments | « src/effects/SkComposeImageFilter.cpp ('k') | src/effects/SkImageSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698