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

Side by Side Diff: android_webview/native/aw_settings.cc

Issue 789583002: Updates subpixel positioning and hinting when DSF is changed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: GN Created 6 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
« no previous file with comments | « no previous file | ash/display/display_manager.cc » ('j') | ui/gfx/font_render_params.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "android_webview/native/aw_settings.h" 5 #include "android_webview/native/aw_settings.h"
6 6
7 #include "android_webview/browser/renderer_host/aw_render_view_host_ext.h" 7 #include "android_webview/browser/renderer_host/aw_render_view_host_ext.h"
8 #include "android_webview/common/aw_content_client.h" 8 #include "android_webview/common/aw_content_client.h"
9 #include "android_webview/native/aw_contents.h" 9 #include "android_webview/native/aw_contents.h"
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 18 matching lines...) Expand all
29 namespace android_webview { 29 namespace android_webview {
30 30
31 namespace { 31 namespace {
32 32
33 void PopulateFixedRendererPreferences(RendererPreferences* prefs) { 33 void PopulateFixedRendererPreferences(RendererPreferences* prefs) {
34 prefs->tap_multiple_targets_strategy = 34 prefs->tap_multiple_targets_strategy =
35 content::TAP_MULTIPLE_TARGETS_STRATEGY_NONE; 35 content::TAP_MULTIPLE_TARGETS_STRATEGY_NONE;
36 36
37 // TODO(boliu): Deduplicate with chrome/ code. 37 // TODO(boliu): Deduplicate with chrome/ code.
38 CR_DEFINE_STATIC_LOCAL(const gfx::FontRenderParams, params, 38 CR_DEFINE_STATIC_LOCAL(const gfx::FontRenderParams, params,
39 (gfx::GetFontRenderParams(gfx::FontRenderParamsQuery(true), NULL))); 39 (gfx::GetCurrentFontRenderParams(
40 gfx::FontRenderParamsQuery(true), NULL)));
40 prefs->should_antialias_text = params.antialiasing; 41 prefs->should_antialias_text = params.antialiasing;
41 prefs->use_subpixel_positioning = params.subpixel_positioning; 42 prefs->use_subpixel_positioning = params.subpixel_positioning;
42 prefs->hinting = params.hinting; 43 prefs->hinting = params.hinting;
43 prefs->use_autohinter = params.autohinter; 44 prefs->use_autohinter = params.autohinter;
44 prefs->use_bitmaps = params.use_bitmaps; 45 prefs->use_bitmaps = params.use_bitmaps;
45 prefs->subpixel_rendering = params.subpixel_rendering; 46 prefs->subpixel_rendering = params.subpixel_rendering;
46 } 47 }
47 48
48 void PopulateFixedWebPreferences(WebPreferences* web_prefs) { 49 void PopulateFixedWebPreferences(WebPreferences* web_prefs) {
49 web_prefs->shrinks_standalone_images_to_fit = false; 50 web_prefs->shrinks_standalone_images_to_fit = false;
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 415
415 static jstring GetDefaultUserAgent(JNIEnv* env, jclass clazz) { 416 static jstring GetDefaultUserAgent(JNIEnv* env, jclass clazz) {
416 return base::android::ConvertUTF8ToJavaString(env, GetUserAgent()).Release(); 417 return base::android::ConvertUTF8ToJavaString(env, GetUserAgent()).Release();
417 } 418 }
418 419
419 bool RegisterAwSettings(JNIEnv* env) { 420 bool RegisterAwSettings(JNIEnv* env) {
420 return RegisterNativesImpl(env); 421 return RegisterNativesImpl(env);
421 } 422 }
422 423
423 } // namespace android_webview 424 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | ash/display/display_manager.cc » ('j') | ui/gfx/font_render_params.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698