| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 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 | 8 |
| 9 | 9 |
| 10 #include "GrTemplates.h" | 10 #include "GrTemplates.h" |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 uint16_t* rgb565 = reinterpret_cast<uint16_t*>(dst); | 178 uint16_t* rgb565 = reinterpret_cast<uint16_t*>(dst); |
| 179 expand_bits(rgb565, bits, width, height, dstRB, srcRB); | 179 expand_bits(rgb565, bits, width, height, dstRB, srcRB); |
| 180 break; | 180 break; |
| 181 } | 181 } |
| 182 case kA888_GrMaskFormat: { | 182 case kA888_GrMaskFormat: { |
| 183 uint32_t* rgba8888 = reinterpret_cast<uint32_t*>(dst); | 183 uint32_t* rgba8888 = reinterpret_cast<uint32_t*>(dst); |
| 184 expand_bits(rgba8888, bits, width, height, dstRB, srcRB); | 184 expand_bits(rgba8888, bits, width, height, dstRB, srcRB); |
| 185 break; | 185 break; |
| 186 } | 186 } |
| 187 default: | 187 default: |
| 188 GrCrash("Invalid GrMaskFormat"); | 188 SkFAIL("Invalid GrMaskFormat"); |
| 189 } | 189 } |
| 190 } else if (srcRB == dstRB) { | 190 } else if (srcRB == dstRB) { |
| 191 memcpy(dst, src, dstRB * height); | 191 memcpy(dst, src, dstRB * height); |
| 192 } else { | 192 } else { |
| 193 const int bbp = GrMaskFormatBytesPerPixel(this->getMaskFormat()); | 193 const int bbp = GrMaskFormatBytesPerPixel(this->getMaskFormat()); |
| 194 for (int y = 0; y < height; y++) { | 194 for (int y = 0; y < height; y++) { |
| 195 memcpy(dst, src, width * bbp); | 195 memcpy(dst, src, width * bbp); |
| 196 src = (const char*)src + srcRB; | 196 src = (const char*)src + srcRB; |
| 197 dst = (char*)dst + dstRB; | 197 dst = (char*)dst + dstRB; |
| 198 } | 198 } |
| (...skipping 23 matching lines...) Expand all Loading... |
| 222 bool SkGrFontScaler::getGlyphPath(uint16_t glyphID, SkPath* path) { | 222 bool SkGrFontScaler::getGlyphPath(uint16_t glyphID, SkPath* path) { |
| 223 | 223 |
| 224 const SkGlyph& glyph = fStrike->getGlyphIDMetrics(glyphID); | 224 const SkGlyph& glyph = fStrike->getGlyphIDMetrics(glyphID); |
| 225 const SkPath* skPath = fStrike->findPath(glyph); | 225 const SkPath* skPath = fStrike->findPath(glyph); |
| 226 if (skPath) { | 226 if (skPath) { |
| 227 *path = *skPath; | 227 *path = *skPath; |
| 228 return true; | 228 return true; |
| 229 } | 229 } |
| 230 return false; | 230 return false; |
| 231 } | 231 } |
| OLD | NEW |