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

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

Issue 1963693002: Less indentation. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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
« no previous file with comments | « src/ports/SkFontHost_win.cpp ('k') | no next file » | 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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 SkAdvancedTypefaceMetrics::WidthRange range(0); 445 SkAdvancedTypefaceMetrics::WidthRange range(0);
446 int16_t advance; 446 int16_t advance;
447 getWidthAdvance(fDWriteFontFace.get(), 1, &advance); 447 getWidthAdvance(fDWriteFontFace.get(), 1, &advance);
448 range.fAdvance.append(1, &advance); 448 range.fAdvance.append(1, &advance);
449 SkAdvancedTypefaceMetrics::FinishRange( 449 SkAdvancedTypefaceMetrics::FinishRange(
450 &range, 0, SkAdvancedTypefaceMetrics::WidthRange::kDefault); 450 &range, 0, SkAdvancedTypefaceMetrics::WidthRange::kDefault);
451 info->fGlyphWidths.emplace_back(std::move(range)); 451 info->fGlyphWidths.emplace_back(std::move(range));
452 } else { 452 } else {
453 IDWriteFontFace* borrowedFontFace = fDWriteFontFace.get(); 453 IDWriteFontFace* borrowedFontFace = fDWriteFontFace.get();
454 info->setGlyphWidths( 454 info->setGlyphWidths(
455 glyphCount, glyphIDs, glyphIDsCount, 455 glyphCount,
456 SkAdvancedTypefaceMetrics::GetAdvance( 456 glyphIDs,
457 [borrowedFontFace](int gId, int16_t* data) { 457 glyphIDsCount,
458 return getWidthAdvance(borrowedFontFace, gId, da ta); 458 SkAdvancedTypefaceMetrics::GetAdvance([borrowedFontFace](int gId , int16_t* data) {
459 })); 459 return getWidthAdvance(borrowedFontFace, gId, data);
460 })
461 );
460 } 462 }
461 } 463 }
462 464
463 return info; 465 return info;
464 } 466 }
465 #endif//defined(SK_BUILD_FOR_WIN32) 467 #endif//defined(SK_BUILD_FOR_WIN32)
OLDNEW
« no previous file with comments | « src/ports/SkFontHost_win.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698