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

Side by Side Diff: src/ports/SkTypeface_win_dw.cpp

Issue 1648343003: Consolidate SK_CRASH and sk_throw into SK_ABORT (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « src/ports/SkTypeface_win_dw.h ('k') | tests/CachedDataTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 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 #include "SkTypes.h" 8 #include "SkTypes.h"
9 #if defined(SK_BUILD_FOR_WIN32) 9 #if defined(SK_BUILD_FOR_WIN32)
10 10
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 fDWriteFontFace->GetGlyphIndices(scratch, limit, &glyphs[baseGlyph]) ; 104 fDWriteFontFace->GetGlyphIndices(scratch, limit, &glyphs[baseGlyph]) ;
105 } 105 }
106 break; 106 break;
107 } 107 }
108 case SkTypeface::kUTF32_Encoding: { 108 case SkTypeface::kUTF32_Encoding: {
109 const UINT32* utf32 = reinterpret_cast<const UINT32*>(chars); 109 const UINT32* utf32 = reinterpret_cast<const UINT32*>(chars);
110 fDWriteFontFace->GetGlyphIndices(utf32, glyphCount, glyphs); 110 fDWriteFontFace->GetGlyphIndices(utf32, glyphCount, glyphs);
111 break; 111 break;
112 } 112 }
113 default: 113 default:
114 SK_CRASH(); 114 SK_ABORT("Invalid Text Encoding");
115 } 115 }
116 116
117 for (int i = 0; i < glyphCount; ++i) { 117 for (int i = 0; i < glyphCount; ++i) {
118 if (0 == glyphs[i]) { 118 if (0 == glyphs[i]) {
119 return i; 119 return i;
120 } 120 }
121 } 121 }
122 return glyphCount; 122 return glyphCount;
123 } 123 }
124 124
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 glyphCount, 455 glyphCount,
456 glyphIDs, 456 glyphIDs,
457 glyphIDsCount, 457 glyphIDsCount,
458 getWidthAdvance)); 458 getWidthAdvance));
459 } 459 }
460 } 460 }
461 461
462 return info; 462 return info;
463 } 463 }
464 #endif//defined(SK_BUILD_FOR_WIN32) 464 #endif//defined(SK_BUILD_FOR_WIN32)
OLDNEW
« no previous file with comments | « src/ports/SkTypeface_win_dw.h ('k') | tests/CachedDataTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698