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

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

Issue 85463005: remove SkFloatToScalar macro (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: add flag to expose SkFloatToScalar to chromium Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « src/ports/SkFontHost_win.cpp ('k') | src/utils/SkCamera.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 2011 Google Inc. 2 * Copyright 2011 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 #undef GetGlyphIndices 9 #undef GetGlyphIndices
10 10
(...skipping 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after
1371 // DirectWrite does not provide for hinting hints. 1371 // DirectWrite does not provide for hinting hints.
1372 h = SkPaint::kSlight_Hinting; 1372 h = SkPaint::kSlight_Hinting;
1373 rec->setHinting(h); 1373 rec->setHinting(h);
1374 1374
1375 #if SK_FONT_HOST_USE_SYSTEM_SETTINGS 1375 #if SK_FONT_HOST_USE_SYSTEM_SETTINGS
1376 IDWriteFactory* factory; 1376 IDWriteFactory* factory;
1377 if (SUCCEEDED(get_dwrite_factory(&factory))) { 1377 if (SUCCEEDED(get_dwrite_factory(&factory))) {
1378 SkTScopedComPtr<IDWriteRenderingParams> defaultRenderingParams; 1378 SkTScopedComPtr<IDWriteRenderingParams> defaultRenderingParams;
1379 if (SUCCEEDED(factory->CreateRenderingParams(&defaultRenderingParams))) { 1379 if (SUCCEEDED(factory->CreateRenderingParams(&defaultRenderingParams))) {
1380 float gamma = defaultRenderingParams->GetGamma(); 1380 float gamma = defaultRenderingParams->GetGamma();
1381 rec->setDeviceGamma(SkFloatToScalar(gamma)); 1381 rec->setDeviceGamma(gamma);
1382 rec->setPaintGamma(SkFloatToScalar(gamma)); 1382 rec->setPaintGamma(gamma);
1383 1383
1384 rec->setContrast(SkFloatToScalar(defaultRenderingParams->GetEnhanced Contrast())); 1384 rec->setContrast(defaultRenderingParams->GetEnhancedContrast());
1385 } 1385 }
1386 } 1386 }
1387 #endif 1387 #endif
1388 } 1388 }
1389 1389
1390 /////////////////////////////////////////////////////////////////////////////// 1390 ///////////////////////////////////////////////////////////////////////////////
1391 //PDF Support 1391 //PDF Support
1392 1392
1393 using namespace skia_advanced_typeface_metrics_utils; 1393 using namespace skia_advanced_typeface_metrics_utils;
1394 1394
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
1898 SK_TRACEHR(hr, "Could not get GetUserDefaultLocaleName."); 1898 SK_TRACEHR(hr, "Could not get GetUserDefaultLocaleName.");
1899 } else { 1899 } else {
1900 localeNameLen = getUserDefaultLocaleNameProc(localeNameStorage, LOCALE_N AME_MAX_LENGTH); 1900 localeNameLen = getUserDefaultLocaleNameProc(localeNameStorage, LOCALE_N AME_MAX_LENGTH);
1901 if (localeNameLen) { 1901 if (localeNameLen) {
1902 localeName = localeNameStorage; 1902 localeName = localeNameStorage;
1903 }; 1903 };
1904 } 1904 }
1905 1905
1906 return SkNEW_ARGS(SkFontMgr_DirectWrite, (sysFontCollection.get(), localeNam e, localeNameLen)); 1906 return SkNEW_ARGS(SkFontMgr_DirectWrite, (sysFontCollection.get(), localeNam e, localeNameLen));
1907 } 1907 }
OLDNEW
« no previous file with comments | « src/ports/SkFontHost_win.cpp ('k') | src/utils/SkCamera.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698