Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Side by Side Diff: src/gpu/SkGrFontScaler.cpp

Issue 257393004: Convert GrCrash->SkFAIL GrDebugCrash->SkDEBUGFAIL (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: whitespace change Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698