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

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

Issue 644813004: Move the ShouldUseDirectWrite function from sandbox_win.cc/.h to ui/gfx/win/dpi.cc/.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review comments from sky Created 6 years, 2 months 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 | « ui/gfx/win/direct_write.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/win/dpi.h" 5 #include "ui/gfx/win/dpi.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include "base/command_line.h"
9 #include "base/win/scoped_hdc.h" 8 #include "base/win/scoped_hdc.h"
10 #include "base/win/windows_version.h" 9 #include "base/win/windows_version.h"
11 #include "base/win/registry.h" 10 #include "base/win/registry.h"
12 #include "ui/gfx/display.h" 11 #include "ui/gfx/display.h"
13 #include "ui/gfx/switches.h"
14 #include "ui/gfx/point_conversions.h" 12 #include "ui/gfx/point_conversions.h"
15 #include "ui/gfx/rect_conversions.h" 13 #include "ui/gfx/rect_conversions.h"
16 #include "ui/gfx/size_conversions.h" 14 #include "ui/gfx/size_conversions.h"
17 15
18 namespace { 16 namespace {
19 17
20 int kDefaultDPIX = 96; 18 int kDefaultDPIX = 96;
21 int kDefaultDPIY = 96; 19 int kDefaultDPIY = 96;
22 20
23 bool force_highdpi_for_testing = false; 21 bool force_highdpi_for_testing = false;
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 return static_cast<int>(GetSystemMetrics(metric) / 221 return static_cast<int>(GetSystemMetrics(metric) /
224 GetDeviceScaleFactor() + 0.5); 222 GetDeviceScaleFactor() + 0.5);
225 } 223 }
226 224
227 bool IsDeviceScaleFactorSet() { 225 bool IsDeviceScaleFactorSet() {
228 return g_device_scale_factor != 0.0f; 226 return g_device_scale_factor != 0.0f;
229 } 227 }
230 228
231 } // namespace win 229 } // namespace win
232 } // namespace gfx 230 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/win/direct_write.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698