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

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

Issue 1988913003: Fix code guarded by SK_FONT_HOST_USE_SYSTEM_SETTINGS. (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 | « no previous file | 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 SkScalerContext::kForceAutohinting_Flag | 259 SkScalerContext::kForceAutohinting_Flag |
260 SkScalerContext::kEmbolden_Flag | 260 SkScalerContext::kEmbolden_Flag |
261 SkScalerContext::kLCD_Vertical_Flag; 261 SkScalerContext::kLCD_Vertical_Flag;
262 rec->fFlags &= ~flagsWeDontSupport; 262 rec->fFlags &= ~flagsWeDontSupport;
263 263
264 SkPaint::Hinting h = rec->getHinting(); 264 SkPaint::Hinting h = rec->getHinting();
265 // DirectWrite does not provide for hinting hints. 265 // DirectWrite does not provide for hinting hints.
266 h = SkPaint::kSlight_Hinting; 266 h = SkPaint::kSlight_Hinting;
267 rec->setHinting(h); 267 rec->setHinting(h);
268 268
269 #if SK_FONT_HOST_USE_SYSTEM_SETTINGS 269 #if defined(SK_FONT_HOST_USE_SYSTEM_SETTINGS)
270 IDWriteFactory* factory = get_dwrite_factory(); 270 IDWriteFactory* factory = sk_get_dwrite_factory();
271 if (factory != nullptr) { 271 if (factory != nullptr) {
272 SkTScopedComPtr<IDWriteRenderingParams> defaultRenderingParams; 272 SkTScopedComPtr<IDWriteRenderingParams> defaultRenderingParams;
273 if (SUCCEEDED(factory->CreateRenderingParams(&defaultRenderingParams))) { 273 if (SUCCEEDED(factory->CreateRenderingParams(&defaultRenderingParams))) {
274 float gamma = defaultRenderingParams->GetGamma(); 274 float gamma = defaultRenderingParams->GetGamma();
275 rec->setDeviceGamma(gamma); 275 rec->setDeviceGamma(gamma);
276 rec->setPaintGamma(gamma); 276 rec->setPaintGamma(gamma);
277 277
278 rec->setContrast(defaultRenderingParams->GetEnhancedContrast()); 278 rec->setContrast(defaultRenderingParams->GetEnhancedContrast());
279 } 279 }
280 } 280 }
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 SkAdvancedTypefaceMetrics::GetAdvance([borrowedFontFace](int gId , int16_t* data) { 458 SkAdvancedTypefaceMetrics::GetAdvance([borrowedFontFace](int gId , int16_t* data) {
459 return getWidthAdvance(borrowedFontFace, gId, data); 459 return getWidthAdvance(borrowedFontFace, gId, data);
460 }) 460 })
461 ); 461 );
462 } 462 }
463 } 463 }
464 464
465 return info; 465 return info;
466 } 466 }
467 #endif//defined(SK_BUILD_FOR_WIN32) 467 #endif//defined(SK_BUILD_FOR_WIN32)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698