OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The Android Open Source Project | 2 * Copyright 2012 The Android Open Source Project |
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 "SkColorFilterImageFilter.h" | 8 #include "SkColorFilterImageFilter.h" |
9 #include "SkBitmap.h" | 9 #include "SkBitmap.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 SkASSERT(1 == this->countInputs()); | 91 SkASSERT(1 == this->countInputs()); |
92 if (!this->cropRectIsSet()) { | 92 if (!this->cropRectIsSet()) { |
93 if (filter) { | 93 if (filter) { |
94 *filter = SkRef(fColorFilter); | 94 *filter = SkRef(fColorFilter); |
95 } | 95 } |
96 return true; | 96 return true; |
97 } | 97 } |
98 return false; | 98 return false; |
99 } | 99 } |
100 | 100 |
| 101 bool SkColorFilterImageFilter::affectsTransparentBlack() const { |
| 102 return fColorFilter->affectsTransparentBlack(); |
| 103 } |
| 104 |
101 #ifndef SK_IGNORE_TO_STRING | 105 #ifndef SK_IGNORE_TO_STRING |
102 void SkColorFilterImageFilter::toString(SkString* str) const { | 106 void SkColorFilterImageFilter::toString(SkString* str) const { |
103 str->appendf("SkColorFilterImageFilter: ("); | 107 str->appendf("SkColorFilterImageFilter: ("); |
104 | 108 |
105 str->appendf("input: ("); | 109 str->appendf("input: ("); |
106 | 110 |
107 if (this->getInput(0)) { | 111 if (this->getInput(0)) { |
108 this->getInput(0)->toString(str); | 112 this->getInput(0)->toString(str); |
109 } | 113 } |
110 | 114 |
111 str->appendf(") color filter: "); | 115 str->appendf(") color filter: "); |
112 fColorFilter->toString(str); | 116 fColorFilter->toString(str); |
113 | 117 |
114 str->append(")"); | 118 str->append(")"); |
115 } | 119 } |
116 #endif | 120 #endif |
OLD | NEW |