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

Side by Side Diff: ui/gfx/win/direct_write.cc

Issue 659883002: Enable hidpi on Linux, refactor a bit on Windows to share Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: constants Created 6 years, 1 month 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 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
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
OLDNEW
« ui/gfx/gfx.gyp ('K') | « ui/gfx/screen_win.cc ('k') | ui/gfx/win/dpi.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698