| 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/windows_version.h" | 10 #include "base/win/windows_version.h" |
| 11 #include "ui/gfx/dpi.h" |
| 11 #include "ui/gfx/switches.h" | 12 #include "ui/gfx/switches.h" |
| 12 #include "ui/gfx/win/dpi.h" | |
| 13 | 13 |
| 14 namespace gfx { | 14 namespace gfx { |
| 15 namespace win { | 15 namespace win { |
| 16 | 16 |
| 17 bool ShouldUseDirectWrite() { | 17 bool ShouldUseDirectWrite() { |
| 18 // If the flag is currently on, and we're on Win7 or above, we enable | 18 // If the flag is currently on, and we're on Win7 or above, we enable |
| 19 // DirectWrite. Skia does not require the additions to DirectWrite in QFE | 19 // DirectWrite. Skia does not require the additions to DirectWrite in QFE |
| 20 // 2670838, but a simple 'better than XP' check is not enough. | 20 // 2670838, but a simple 'better than XP' check is not enough. |
| 21 if (base::win::GetVersion() < base::win::VERSION_WIN7) | 21 if (base::win::GetVersion() < base::win::VERSION_WIN7) |
| 22 return false; | 22 return false; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 39 return true; | 39 return true; |
| 40 | 40 |
| 41 // Otherwise, check the field trial. | 41 // Otherwise, check the field trial. |
| 42 const std::string group_name = | 42 const std::string group_name = |
| 43 base::FieldTrialList::FindFullName("DirectWrite"); | 43 base::FieldTrialList::FindFullName("DirectWrite"); |
| 44 return group_name != "Disabled"; | 44 return group_name != "Disabled"; |
| 45 } | 45 } |
| 46 | 46 |
| 47 } // namespace win | 47 } // namespace win |
| 48 } // namespace gfx | 48 } // namespace gfx |
| OLD | NEW |