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

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

Issue 1855733002: change flattenable factory to return sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/SkCornerPathEffect.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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 } 51 }
52 52
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 sk_sp<SkFlattenable> SkComposeImageFilter::CreateProc(SkReadBuffer& buffer) {
62 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 2); 62 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 2);
63 return SkComposeImageFilter::Make(common.getInput(0), common.getInput(1)).re lease(); 63 return SkComposeImageFilter::Make(common.getInput(0), common.getInput(1));
64 } 64 }
65 65
66 #ifndef SK_IGNORE_TO_STRING 66 #ifndef SK_IGNORE_TO_STRING
67 void SkComposeImageFilter::toString(SkString* str) const { 67 void SkComposeImageFilter::toString(SkString* str) const {
68 SkImageFilter* outer = getInput(0); 68 SkImageFilter* outer = getInput(0);
69 SkImageFilter* inner = getInput(1); 69 SkImageFilter* inner = getInput(1);
70 70
71 str->appendf("SkComposeImageFilter: ("); 71 str->appendf("SkComposeImageFilter: (");
72 72
73 str->appendf("outer: "); 73 str->appendf("outer: ");
74 outer->toString(str); 74 outer->toString(str);
75 75
76 str->appendf("inner: "); 76 str->appendf("inner: ");
77 inner->toString(str); 77 inner->toString(str);
78 78
79 str->appendf(")"); 79 str->appendf(")");
80 } 80 }
81 #endif 81 #endif
OLDNEW
« no previous file with comments | « src/effects/SkColorFilterImageFilter.cpp ('k') | src/effects/SkCornerPathEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698