summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ui/gfx/screen_win.cc4
-rw-r--r--ui/gfx/win/dpi.cc4
-rw-r--r--ui/gfx/win/dpi.h2
-rw-r--r--ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc2
4 files changed, 3 insertions, 9 deletions
diff --git a/ui/gfx/screen_win.cc b/ui/gfx/screen_win.cc
index a115a10..ae07bbe 100644
--- a/ui/gfx/screen_win.cc
+++ b/ui/gfx/screen_win.cc
@@ -94,7 +94,7 @@ ScreenWin::~ScreenWin() {
}
bool ScreenWin::IsDIPEnabled() {
- return IsInHighDPIMode();
+ return GetDPIScale() > 1.0;
}
gfx::Point ScreenWin::GetCursorScreenPoint() {
@@ -164,7 +164,7 @@ gfx::Display ScreenWin::GetPrimaryDisplay() const {
gfx::Display display = GetDisplay(mi);
// TODO(kevers|girard): Test if these checks can be reintroduced for high-DIP
// once more of the app is DIP-aware.
- if (!(IsInHighDPIMode() || IsHighDPIEnabled())) {
+ if (!(GetDPIScale() > 1.0 || IsHighDPIEnabled())) {
DCHECK_EQ(GetSystemMetrics(SM_CXSCREEN), display.size().width());
DCHECK_EQ(GetSystemMetrics(SM_CYSCREEN), display.size().height());
}
diff --git a/ui/gfx/win/dpi.cc b/ui/gfx/win/dpi.cc
index 2777f7c..86cd15c 100644
--- a/ui/gfx/win/dpi.cc
+++ b/ui/gfx/win/dpi.cc
@@ -159,10 +159,6 @@ bool IsHighDPIEnabled() {
return value != 0;
}
-bool IsInHighDPIMode() {
- return GetDPIScale() > 1.0;
-}
-
void EnableHighDPISupport() {
if (IsHighDPIEnabled() &&
!SetProcessDpiAwarenessWrapper(PROCESS_SYSTEM_DPI_AWARE)) {
diff --git a/ui/gfx/win/dpi.h b/ui/gfx/win/dpi.h
index 19f6a57..5bf5af4 100644
--- a/ui/gfx/win/dpi.h
+++ b/ui/gfx/win/dpi.h
@@ -28,8 +28,6 @@ GFX_EXPORT float GetDPIScale();
// Tests to see if the command line flag "--high-dpi-support" is set.
GFX_EXPORT bool IsHighDPIEnabled();
-GFX_EXPORT bool IsInHighDPIMode();
-
GFX_EXPORT void EnableHighDPISupport();
GFX_EXPORT void ForceHighDPISupportForTesting(float scale);
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index d184ae4..ac57a18 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -286,7 +286,7 @@ void DesktopWindowTreeHostWin::SetShape(gfx::NativeRegion native_region) {
// See crbug.com/410593.
gfx::NativeRegion shape = native_region;
SkRegion device_region;
- if (gfx::IsInHighDPIMode()) {
+ if (gfx::GetDPIScale() > 1.0) {
shape = &device_region;
const float& scale = gfx::GetDPIScale();
std::vector<SkIRect> rects;