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

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

Issue 308003020: Pass the device scale factor in the command line to renderer processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed presubmit warnings Created 6 years, 6 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/dpi.h ('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" 8 #include "base/command_line.h"
9 #include "base/win/scoped_hdc.h" 9 #include "base/win/scoped_hdc.h"
10 #include "base/win/windows_version.h" 10 #include "base/win/windows_version.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 return scale; 239 return scale;
240 } 240 }
241 241
242 double GetUndocumentedDPITouchScale() { 242 double GetUndocumentedDPITouchScale() {
243 static double scale = 243 static double scale =
244 (base::win::GetVersion() < base::win::VERSION_WIN8_1) ? 244 (base::win::GetVersion() < base::win::VERSION_WIN8_1) ?
245 GetUndocumentedDPIScale() : 1.0; 245 GetUndocumentedDPIScale() : 1.0;
246 return scale; 246 return scale;
247 } 247 }
248 248
249 bool IsDeviceScaleFactorSet() {
250 return g_device_scale_factor != 0.0f;
251 }
252
249 } // namespace win 253 } // namespace win
250 } // namespace gfx 254 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/win/dpi.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698