| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "ui/gfx/win/direct_write.h" | 5 #include "ui/gfx/win/direct_write.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
| 10 #include "base/win/registry.h" | 10 #include "base/win/registry.h" |
| 11 #include "base/win/windows_version.h" | 11 #include "base/win/windows_version.h" |
| 12 #include "ui/gfx/dpi.h" |
| 12 #include "ui/gfx/switches.h" | 13 #include "ui/gfx/switches.h" |
| 13 #include "ui/gfx/win/dpi.h" | |
| 14 | 14 |
| 15 namespace gfx { | 15 namespace gfx { |
| 16 namespace win { | 16 namespace win { |
| 17 | 17 |
| 18 bool ShouldUseDirectWrite() { | 18 bool ShouldUseDirectWrite() { |
| 19 // If the flag is currently on, and we're on Win7 or above, we enable | 19 // If the flag is currently on, and we're on Win7 or above, we enable |
| 20 // DirectWrite. Skia does not require the additions to DirectWrite in QFE | 20 // DirectWrite. Skia does not require the additions to DirectWrite in QFE |
| 21 // 2670838, but a simple 'better than XP' check is not enough. | 21 // 2670838, but a simple 'better than XP' check is not enough. |
| 22 if (base::win::GetVersion() < base::win::VERSION_WIN7) | 22 if (base::win::GetVersion() < base::win::VERSION_WIN7) |
| 23 return false; | 23 return false; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 54 return false; | 54 return false; |
| 55 | 55 |
| 56 // Otherwise, check the field trial. | 56 // Otherwise, check the field trial. |
| 57 const std::string group_name = | 57 const std::string group_name = |
| 58 base::FieldTrialList::FindFullName("DirectWrite"); | 58 base::FieldTrialList::FindFullName("DirectWrite"); |
| 59 return group_name != "Disabled"; | 59 return group_name != "Disabled"; |
| 60 } | 60 } |
| 61 | 61 |
| 62 } // namespace win | 62 } // namespace win |
| 63 } // namespace gfx | 63 } // namespace gfx |
| OLD | NEW |