OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "ui/base/win/dpi_setup.h" | |
6 | |
7 #include "ui/base/layout.h" | |
8 #include "ui/gfx/display.h" | |
9 #include "ui/gfx/win/dpi.h" | |
10 | |
11 namespace ui { | |
12 namespace win { | |
13 | |
14 void InitDeviceScaleFactor() { | |
15 float scale = 1.0f; | |
16 if (gfx::IsHighDPIEnabled()) { | |
17 float scale = gfx::Display::HasForceDeviceScaleFactor() ? | |
18 gfx::Display::GetForcedDeviceScaleFactor() : gfx::GetDPIScale(); | |
sky
2013/09/25 19:28:15
nit: indent 2 more.
| |
19 // Quantize to nearest supported scale factor. | |
20 scale = ui::GetImageScale(ui::GetSupportedScaleFactor(scale)); | |
21 } | |
22 gfx::InitDeviceScaleFactor(scale); | |
23 } | |
24 | |
25 } // namespace win | |
26 } // namespace ui | |
OLD | NEW |