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

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

Issue 1847583002: Update SkMergeImageFilter to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to To 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/SkDisplacementMapEffect.cpp ('k') | src/effects/SkLightingImageFilter.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"
(...skipping 19 matching lines...) Expand all
30 SkFlattenable* SkDropShadowImageFilter::CreateProc(SkReadBuffer& buffer) { 30 SkFlattenable* SkDropShadowImageFilter::CreateProc(SkReadBuffer& buffer) {
31 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1); 31 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1);
32 SkScalar dx = buffer.readScalar(); 32 SkScalar dx = buffer.readScalar();
33 SkScalar dy = buffer.readScalar(); 33 SkScalar dy = buffer.readScalar();
34 SkScalar sigmaX = buffer.readScalar(); 34 SkScalar sigmaX = buffer.readScalar();
35 SkScalar sigmaY = buffer.readScalar(); 35 SkScalar sigmaY = buffer.readScalar();
36 SkColor color = buffer.readColor(); 36 SkColor color = buffer.readColor();
37 ShadowMode shadowMode = buffer.isVersionLT(SkReadBuffer::kDropShadowMode_Ver sion) ? 37 ShadowMode shadowMode = buffer.isVersionLT(SkReadBuffer::kDropShadowMode_Ver sion) ?
38 kDrawShadowAndForeground_ShadowMode : 38 kDrawShadowAndForeground_ShadowMode :
39 static_cast<ShadowMode>(buffer.readInt()); 39 static_cast<ShadowMode>(buffer.readInt());
40 return Create(dx, dy, sigmaX, sigmaY, color, shadowMode, common.getInput(0), 40 return Create(dx, dy, sigmaX, sigmaY, color, shadowMode, common.getInput(0). get(),
41 &common.cropRect()); 41 &common.cropRect());
42 } 42 }
43 43
44 void SkDropShadowImageFilter::flatten(SkWriteBuffer& buffer) const { 44 void SkDropShadowImageFilter::flatten(SkWriteBuffer& buffer) const {
45 this->INHERITED::flatten(buffer); 45 this->INHERITED::flatten(buffer);
46 buffer.writeScalar(fDx); 46 buffer.writeScalar(fDx);
47 buffer.writeScalar(fDy); 47 buffer.writeScalar(fDy);
48 buffer.writeScalar(fSigmaX); 48 buffer.writeScalar(fSigmaX);
49 buffer.writeScalar(fSigmaY); 49 buffer.writeScalar(fSigmaY);
50 buffer.writeColor(fColor); 50 buffer.writeColor(fColor);
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 "kDrawShadowAndForeground", "kDrawShadowOnly" 154 "kDrawShadowAndForeground", "kDrawShadowOnly"
155 }; 155 };
156 156
157 static_assert(kShadowModeCount == SK_ARRAY_COUNT(gModeStrings), "enum_mismat ch"); 157 static_assert(kShadowModeCount == SK_ARRAY_COUNT(gModeStrings), "enum_mismat ch");
158 158
159 str->appendf(" mode: %s", gModeStrings[fShadowMode]); 159 str->appendf(" mode: %s", gModeStrings[fShadowMode]);
160 160
161 str->append(")"); 161 str->append(")");
162 } 162 }
163 #endif 163 #endif
OLDNEW
« no previous file with comments | « src/effects/SkDisplacementMapEffect.cpp ('k') | src/effects/SkLightingImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698