| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 | 8 |
| 9 #include "SkFixed.h" |
| 10 #include "SkReadBuffer.h" |
| 11 #include "SkString.h" |
| 9 #include "SkTableMaskFilter.h" | 12 #include "SkTableMaskFilter.h" |
| 10 #include "SkReadBuffer.h" | |
| 11 #include "SkWriteBuffer.h" | 13 #include "SkWriteBuffer.h" |
| 12 #include "SkString.h" | |
| 13 | 14 |
| 14 SkTableMaskFilter::SkTableMaskFilter() { | 15 SkTableMaskFilter::SkTableMaskFilter() { |
| 15 for (int i = 0; i < 256; i++) { | 16 for (int i = 0; i < 256; i++) { |
| 16 fTable[i] = i; | 17 fTable[i] = i; |
| 17 } | 18 } |
| 18 } | 19 } |
| 19 | 20 |
| 20 SkTableMaskFilter::SkTableMaskFilter(const uint8_t table[256]) { | 21 SkTableMaskFilter::SkTableMaskFilter(const uint8_t table[256]) { |
| 21 memcpy(fTable, table, sizeof(fTable)); | 22 memcpy(fTable, table, sizeof(fTable)); |
| 22 } | 23 } |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 136 |
| 136 str->append("table: "); | 137 str->append("table: "); |
| 137 for (int i = 0; i < 255; ++i) { | 138 for (int i = 0; i < 255; ++i) { |
| 138 str->appendf("%d, ", fTable[i]); | 139 str->appendf("%d, ", fTable[i]); |
| 139 } | 140 } |
| 140 str->appendf("%d", fTable[255]); | 141 str->appendf("%d", fTable[255]); |
| 141 | 142 |
| 142 str->append(")"); | 143 str->append(")"); |
| 143 } | 144 } |
| 144 #endif | 145 #endif |
| OLD | NEW |