Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/gfx/font_render_params.h" | 5 #include "ui/gfx/font_render_params.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "ui/gfx/switches.h" | 9 #include "ui/gfx/switches.h" |
| 10 | 10 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 56 params->subpixel_rendering = FontRenderParams::SUBPIXEL_RENDERING_VRGB; | 56 params->subpixel_rendering = FontRenderParams::SUBPIXEL_RENDERING_VRGB; |
| 57 break; | 57 break; |
| 58 case FC_RGBA_VBGR: | 58 case FC_RGBA_VBGR: |
| 59 params->subpixel_rendering = FontRenderParams::SUBPIXEL_RENDERING_VBGR; | 59 params->subpixel_rendering = FontRenderParams::SUBPIXEL_RENDERING_VBGR; |
| 60 break; | 60 break; |
| 61 default: | 61 default: |
| 62 params->subpixel_rendering = FontRenderParams::SUBPIXEL_RENDERING_NONE; | 62 params->subpixel_rendering = FontRenderParams::SUBPIXEL_RENDERING_NONE; |
| 63 } | 63 } |
| 64 | 64 |
| 65 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 65 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 66 // TODO(derat): Get the autohinter setting from FontConfig. Until then, | |
| 67 // maintain backward compatibility with what we were doing previously. | |
| 68 params->autohinter = renderer; | |
|
Daniel Erat
2014/07/10 23:46:35
so this is pretty gross. SkiaTextRenderer wasn't p
msw
2014/07/11 00:29:09
Acknowledged.
| |
| 66 const LinuxFontDelegate* delegate = LinuxFontDelegate::instance(); | 69 const LinuxFontDelegate* delegate = LinuxFontDelegate::instance(); |
| 67 if (delegate) { | 70 if (delegate) { |
| 68 params->antialiasing = delegate->UseAntialiasing(); | 71 params->antialiasing = delegate->UseAntialiasing(); |
| 69 params->hinting = delegate->GetHintingStyle(); | 72 params->hinting = delegate->GetHintingStyle(); |
| 70 params->subpixel_rendering = delegate->GetSubpixelRenderingStyle(); | 73 params->subpixel_rendering = delegate->GetSubpixelRenderingStyle(); |
| 71 } | 74 } |
| 72 #endif | 75 #endif |
| 73 | 76 |
| 74 params->subpixel_positioning = SubpixelPositioningRequested(renderer); | 77 params->subpixel_positioning = SubpixelPositioningRequested(renderer); |
| 75 | 78 |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 96 LoadDefaults(&default_params, /* renderer */ true); | 99 LoadDefaults(&default_params, /* renderer */ true); |
| 97 loaded_defaults = true; | 100 loaded_defaults = true; |
| 98 return default_params; | 101 return default_params; |
| 99 } | 102 } |
| 100 | 103 |
| 101 bool GetDefaultWebkitSubpixelPositioning() { | 104 bool GetDefaultWebkitSubpixelPositioning() { |
| 102 return SubpixelPositioningRequested(true); | 105 return SubpixelPositioningRequested(true); |
| 103 } | 106 } |
| 104 | 107 |
| 105 } // namespace gfx | 108 } // namespace gfx |
| OLD | NEW |