Cast: Stop logging kVideoFrameSentToEncoder and rename a couple events.
[chromium-blink-merge.git] / ui / base / win / dpi_setup.cc
blob39bf185180a387421c2602dc59b12b71f27ed2f7
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.
5 #include "ui/base/win/dpi_setup.h"
7 #include "base/command_line.h"
8 #include "ui/base/layout.h"
9 #include "ui/gfx/display.h"
10 #include "ui/gfx/win/dpi.h"
12 namespace ui {
13 namespace win {
15 void InitDeviceScaleFactor() {
16 float scale = 1.0;
17 if (CommandLine::ForCurrentProcess()->HasSwitch("silent-launch")) {
18 if (gfx::IsHighDPIEnabled())
19 scale = gfx::GetModernUIScale();
21 else {
22 scale = gfx::GetDPIScale();
24 gfx::InitDeviceScaleFactor(scale);
27 } // namespace win
28 } // namespace ui