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

Side by Side Diff: content/renderer/render_view_win.cc

Issue 1021643002: Retrieve and pass subpixel lcd geometry on windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ws Created 5 years, 9 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
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/public/common/renderer_preferences.h" 5 #include "content/public/common/renderer_preferences.h"
6 #include "content/renderer/render_view_impl.h" 6 #include "content/renderer/render_view_impl.h"
7 #include "third_party/WebKit/public/web/win/WebFontRendering.h" 7 #include "third_party/WebKit/public/web/win/WebFontRendering.h"
8 #include "ui/gfx/font_render_params.h"
8 9
9 using blink::WebFontRendering; 10 using blink::WebFontRendering;
10 11
11 namespace content { 12 namespace content {
12 13
13 void RenderViewImpl::UpdateFontRenderingFromRendererPrefs() { 14 void RenderViewImpl::UpdateFontRenderingFromRendererPrefs() {
14 const RendererPreferences& prefs = renderer_preferences_; 15 const RendererPreferences& prefs = renderer_preferences_;
15 16
16 // Cache the system font metrics in blink. 17 // Cache the system font metrics in blink.
17 blink::WebFontRendering::setMenuFontMetrics( 18 blink::WebFontRendering::setMenuFontMetrics(
18 prefs.menu_font_family_name.c_str(), prefs.menu_font_height); 19 prefs.menu_font_family_name.c_str(), prefs.menu_font_height);
19 20
20 blink::WebFontRendering::setSmallCaptionFontMetrics( 21 blink::WebFontRendering::setSmallCaptionFontMetrics(
21 prefs.small_caption_font_family_name.c_str(), 22 prefs.small_caption_font_family_name.c_str(),
22 prefs.small_caption_font_height); 23 prefs.small_caption_font_height);
23 24
24 blink::WebFontRendering::setStatusFontMetrics( 25 blink::WebFontRendering::setStatusFontMetrics(
25 prefs.status_font_family_name.c_str(), prefs.status_font_height); 26 prefs.status_font_family_name.c_str(), prefs.status_font_height);
27
28 blink::WebFontRendering::setLCDOrder(
29 gfx::FontRenderParams::SubpixelRenderingToSkiaLCDOrder(
30 prefs.subpixel_rendering));
31 blink::WebFontRendering::setLCDOrientation(
32 gfx::FontRenderParams::SubpixelRenderingToSkiaLCDOrientation(
33 prefs.subpixel_rendering));
26 } 34 }
27 35
28 } // namespace content 36 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698