OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #include "SkKernel33MaskFilter.h" | 8 #include "SkKernel33MaskFilter.h" |
9 #include "SkColorPriv.h" | 9 #include "SkColorPriv.h" |
10 #include "SkFlattenableBuffers.h" | 10 #include "SkFlattenableBuffers.h" |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 } | 113 } |
114 | 114 |
115 void SkKernel33MaskFilter::flatten(SkFlattenableWriteBuffer& wb) const { | 115 void SkKernel33MaskFilter::flatten(SkFlattenableWriteBuffer& wb) const { |
116 this->INHERITED::flatten(wb); | 116 this->INHERITED::flatten(wb); |
117 wb.writeIntArray(&fKernel[0][0], 9); | 117 wb.writeIntArray(&fKernel[0][0], 9); |
118 wb.writeInt(fShift); | 118 wb.writeInt(fShift); |
119 } | 119 } |
120 | 120 |
121 SkKernel33MaskFilter::SkKernel33MaskFilter(SkFlattenableReadBuffer& rb) | 121 SkKernel33MaskFilter::SkKernel33MaskFilter(SkFlattenableReadBuffer& rb) |
122 : SkKernel33ProcMaskFilter(rb) { | 122 : SkKernel33ProcMaskFilter(rb) { |
123 SkDEBUGCODE(const uint32_t count = )rb.readIntArray(&fKernel[0][0]); | 123 SkDEBUGCODE(bool success = )rb.readIntArray(&fKernel[0][0], 9); |
124 SkASSERT(9 == count); | 124 SkASSERT(success); |
125 fShift = rb.readInt(); | 125 fShift = rb.readInt(); |
126 } | 126 } |
127 | 127 |
128 #ifdef SK_DEVELOPER | 128 #ifdef SK_DEVELOPER |
129 void SkKernel33MaskFilter::toString(SkString* str) const { | 129 void SkKernel33MaskFilter::toString(SkString* str) const { |
130 str->append("SkKernel33MaskFilter: ("); | 130 str->append("SkKernel33MaskFilter: ("); |
131 | 131 |
132 str->appendf("kernel: (%d, %d, %d, %d, %d, %d, %d, %d, %d), ", | 132 str->appendf("kernel: (%d, %d, %d, %d, %d, %d, %d, %d, %d), ", |
133 fKernel[0][0], fKernel[0][1], fKernel[0][2], | 133 fKernel[0][0], fKernel[0][1], fKernel[0][2], |
134 fKernel[1][0], fKernel[1][1], fKernel[1][2], | 134 fKernel[1][0], fKernel[1][1], fKernel[1][2], |
135 fKernel[2][0], fKernel[2][1], fKernel[2][2]); | 135 fKernel[2][0], fKernel[2][1], fKernel[2][2]); |
136 str->appendf("shift: %d, ", fShift); | 136 str->appendf("shift: %d, ", fShift); |
137 | 137 |
138 this->INHERITED::toString(str); | 138 this->INHERITED::toString(str); |
139 | 139 |
140 str->append(")"); | 140 str->append(")"); |
141 } | 141 } |
142 #endif | 142 #endif |
OLD | NEW |