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

Side by Side Diff: src/effects/SkAlphaThresholdFilter.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/core/SkMatrixImageFilter.cpp ('k') | src/effects/SkBlurImageFilter.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 "SkAlphaThresholdFilter.h" 8 #include "SkAlphaThresholdFilter.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkDevice.h" 10 #include "SkDevice.h"
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 } 262 }
263 263
264 #endif 264 #endif
265 265
266 SkFlattenable* SkAlphaThresholdFilterImpl::CreateProc(SkReadBuffer& buffer) { 266 SkFlattenable* SkAlphaThresholdFilterImpl::CreateProc(SkReadBuffer& buffer) {
267 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1); 267 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1);
268 SkScalar inner = buffer.readScalar(); 268 SkScalar inner = buffer.readScalar();
269 SkScalar outer = buffer.readScalar(); 269 SkScalar outer = buffer.readScalar();
270 SkRegion rgn; 270 SkRegion rgn;
271 buffer.readRegion(&rgn); 271 buffer.readRegion(&rgn);
272 return SkAlphaThresholdFilter::Create(rgn, inner, outer, common.getInput(0)) ; 272 return SkAlphaThresholdFilter::Create(rgn, inner, outer, common.getInput(0). get());
273 } 273 }
274 274
275 SkAlphaThresholdFilterImpl::SkAlphaThresholdFilterImpl(const SkRegion& region, 275 SkAlphaThresholdFilterImpl::SkAlphaThresholdFilterImpl(const SkRegion& region,
276 SkScalar innerThreshold, 276 SkScalar innerThreshold,
277 SkScalar outerThreshold, 277 SkScalar outerThreshold,
278 SkImageFilter* input) 278 SkImageFilter* input)
279 : INHERITED(1, &input) 279 : INHERITED(1, &input)
280 , fRegion(region) 280 , fRegion(region)
281 , fInnerThreshold(innerThreshold) 281 , fInnerThreshold(innerThreshold)
282 , fOuterThreshold(outerThreshold) { 282 , fOuterThreshold(outerThreshold) {
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 return true; 403 return true;
404 } 404 }
405 405
406 #ifndef SK_IGNORE_TO_STRING 406 #ifndef SK_IGNORE_TO_STRING
407 void SkAlphaThresholdFilterImpl::toString(SkString* str) const { 407 void SkAlphaThresholdFilterImpl::toString(SkString* str) const {
408 str->appendf("SkAlphaThresholdImageFilter: ("); 408 str->appendf("SkAlphaThresholdImageFilter: (");
409 str->appendf("inner: %f outer: %f", fInnerThreshold, fOuterThreshold); 409 str->appendf("inner: %f outer: %f", fInnerThreshold, fOuterThreshold);
410 str->append(")"); 410 str->append(")");
411 } 411 }
412 #endif 412 #endif
OLDNEW
« no previous file with comments | « src/core/SkMatrixImageFilter.cpp ('k') | src/effects/SkBlurImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698