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

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

Issue 1610823002: Consolidate SK_CRASH and sk_throw into SK_ABORT (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: windows fix Created 4 years, 11 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/pathops/SkPathOpsDebug.cpp ('k') | src/ports/SkFontMgr_fontconfig.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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 2158 matching lines...) Expand 10 before | Expand all | Expand 10 after
2169 // Try a run of non-bmp. 2169 // Try a run of non-bmp.
2170 while (glyphIndex < glyphCount && utf32[glyphIndex] > 0xFFFF) { 2170 while (glyphIndex < glyphCount && utf32[glyphIndex] > 0xFFFF) {
2171 SkUTF16_FromUnichar(utf32[glyphIndex], reinterpret_cast<uint16_t *>(scratch)); 2171 SkUTF16_FromUnichar(utf32[glyphIndex], reinterpret_cast<uint16_t *>(scratch));
2172 glyphs[glyphIndex] = nonBmpCharToGlyph(hdc, &sc, scratch); 2172 glyphs[glyphIndex] = nonBmpCharToGlyph(hdc, &sc, scratch);
2173 ++glyphIndex; 2173 ++glyphIndex;
2174 } 2174 }
2175 } 2175 }
2176 break; 2176 break;
2177 } 2177 }
2178 default: 2178 default:
2179 SK_CRASH(); 2179 SK_ABORT("Invalid Text Encoding");
2180 } 2180 }
2181 2181
2182 if (sc) { 2182 if (sc) {
2183 ::ScriptFreeCache(&sc); 2183 ::ScriptFreeCache(&sc);
2184 } 2184 }
2185 2185
2186 for (int i = 0; i < glyphCount; ++i) { 2186 for (int i = 0; i < glyphCount; ++i) {
2187 if (0 == glyphs[i]) { 2187 if (0 == glyphs[i]) {
2188 return i; 2188 return i;
2189 } 2189 }
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
2508 2508
2509 private: 2509 private:
2510 SkTDArray<ENUMLOGFONTEX> fLogFontArray; 2510 SkTDArray<ENUMLOGFONTEX> fLogFontArray;
2511 }; 2511 };
2512 2512
2513 /////////////////////////////////////////////////////////////////////////////// 2513 ///////////////////////////////////////////////////////////////////////////////
2514 2514
2515 SkFontMgr* SkFontMgr_New_GDI() { return new SkFontMgrGDI; } 2515 SkFontMgr* SkFontMgr_New_GDI() { return new SkFontMgrGDI; }
2516 2516
2517 #endif//defined(SK_BUILD_FOR_WIN32) 2517 #endif//defined(SK_BUILD_FOR_WIN32)
OLDNEW
« no previous file with comments | « src/pathops/SkPathOpsDebug.cpp ('k') | src/ports/SkFontMgr_fontconfig.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698