OLD | NEW |
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 Loading... |
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 |
OLD | NEW |