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

Side by Side Diff: src/effects/SkComposeImageFilter.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/SkColorFilterImageFilter.cpp ('k') | src/effects/SkDisplacementMapEffect.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 "SkComposeImageFilter.h" 8 #include "SkComposeImageFilter.h"
9 9
10 #include "SkReadBuffer.h" 10 #include "SkReadBuffer.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 SkIRect SkComposeImageFilter::onFilterBounds(const SkIRect& src, const SkMatrix& ctm, 53 SkIRect SkComposeImageFilter::onFilterBounds(const SkIRect& src, const SkMatrix& ctm,
54 MapDirection direction) const { 54 MapDirection direction) const {
55 SkImageFilter* outer = this->getInput(0); 55 SkImageFilter* outer = this->getInput(0);
56 SkImageFilter* inner = this->getInput(1); 56 SkImageFilter* inner = this->getInput(1);
57 57
58 return outer->filterBounds(inner->filterBounds(src, ctm, direction), ctm, di rection); 58 return outer->filterBounds(inner->filterBounds(src, ctm, direction), ctm, di rection);
59 } 59 }
60 60
61 SkFlattenable* SkComposeImageFilter::CreateProc(SkReadBuffer& buffer) { 61 SkFlattenable* SkComposeImageFilter::CreateProc(SkReadBuffer& buffer) {
62 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 2); 62 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 2);
63 return SkComposeImageFilter::Make(sk_ref_sp<SkImageFilter>(common.getInput(0 )), 63 return SkComposeImageFilter::Make(common.getInput(0), common.getInput(1)).re lease();
64 sk_ref_sp<SkImageFilter>(common.getInput(1 ))).release();
65 } 64 }
66 65
67 #ifndef SK_IGNORE_TO_STRING 66 #ifndef SK_IGNORE_TO_STRING
68 void SkComposeImageFilter::toString(SkString* str) const { 67 void SkComposeImageFilter::toString(SkString* str) const {
69 SkImageFilter* outer = getInput(0); 68 SkImageFilter* outer = getInput(0);
70 SkImageFilter* inner = getInput(1); 69 SkImageFilter* inner = getInput(1);
71 70
72 str->appendf("SkComposeImageFilter: ("); 71 str->appendf("SkComposeImageFilter: (");
73 72
74 str->appendf("outer: "); 73 str->appendf("outer: ");
75 outer->toString(str); 74 outer->toString(str);
76 75
77 str->appendf("inner: "); 76 str->appendf("inner: ");
78 inner->toString(str); 77 inner->toString(str);
79 78
80 str->appendf(")"); 79 str->appendf(")");
81 } 80 }
82 #endif 81 #endif
OLDNEW
« no previous file with comments | « src/effects/SkColorFilterImageFilter.cpp ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698