| 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 "SkMergeImageFilter.h" | 8 #include "SkMergeImageFilter.h" |
| 9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
| 10 #include "SkDevice.h" | 10 #include "SkDevice.h" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 return Create(common.inputs(), count, NULL, &common.cropRect(), common.uniqu
eID()); | 133 return Create(common.inputs(), count, NULL, &common.cropRect(), common.uniqu
eID()); |
| 134 } | 134 } |
| 135 | 135 |
| 136 void SkMergeImageFilter::flatten(SkWriteBuffer& buffer) const { | 136 void SkMergeImageFilter::flatten(SkWriteBuffer& buffer) const { |
| 137 this->INHERITED::flatten(buffer); | 137 this->INHERITED::flatten(buffer); |
| 138 buffer.writeBool(fModes != NULL); | 138 buffer.writeBool(fModes != NULL); |
| 139 if (fModes) { | 139 if (fModes) { |
| 140 buffer.writeByteArray(fModes, countInputs() * sizeof(fModes[0])); | 140 buffer.writeByteArray(fModes, countInputs() * sizeof(fModes[0])); |
| 141 } | 141 } |
| 142 } | 142 } |
| 143 |
| 144 #ifndef SK_IGNORE_TO_STRING |
| 145 void SkMergeImageFilter::toString(SkString* str) const { |
| 146 str->appendf("SkMergeImageFilter: ("); |
| 147 |
| 148 for (int i = 0; i < this->countInputs(); ++i) { |
| 149 SkImageFilter* filter = this->getInput(i); |
| 150 str->appendf("%d: (", i); |
| 151 filter->toString(str); |
| 152 str->appendf(")"); |
| 153 } |
| 154 |
| 155 str->append(")"); |
| 156 } |
| 157 #endif |
| OLD | NEW |