From 0587c5c29f3e3244c6936d9f8920b834bd705a52 Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Thu, 15 Sep 2022 10:13:13 +0000 Subject: [PATCH] Bug 1787079 - Expose gfx::GetDisplayConfig(). r=gfx-reviewers,lsalzman We'd like to use it for changing DPI settings for the primary monitor. Differential Revision: https://phabricator.services.mozilla.com/D156264 --- gfx/thebes/DisplayConfigWindows.cpp | 8 -------- gfx/thebes/DisplayConfigWindows.h | 12 +++++++++++- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/gfx/thebes/DisplayConfigWindows.cpp b/gfx/thebes/DisplayConfigWindows.cpp index 49fc13c580b7..f9696a4070fd 100644 --- a/gfx/thebes/DisplayConfigWindows.cpp +++ b/gfx/thebes/DisplayConfigWindows.cpp @@ -5,9 +5,6 @@ #include #include -#include -#include -#include #include "DisplayConfigWindows.h" @@ -16,11 +13,6 @@ namespace gfx { using namespace std; -struct DisplayConfig { - vector mPaths; - vector mModes; -}; - optional GetDisplayConfig() { LONG result; diff --git a/gfx/thebes/DisplayConfigWindows.h b/gfx/thebes/DisplayConfigWindows.h index fa5fae8b22ef..62bc03cf3da2 100644 --- a/gfx/thebes/DisplayConfigWindows.h +++ b/gfx/thebes/DisplayConfigWindows.h @@ -6,13 +6,23 @@ #ifndef mozilla_gfx_thebes_DisplayConfigWindows_h #define mozilla_gfx_thebes_DisplayConfigWindows_h -#include // for std::pair +#include // for std::optional +#include // for std::pair +#include // for std::vector +#include #include "mozilla/gfx/Point.h" // for IntSize #include "nsTArray.h" namespace mozilla { namespace gfx { +struct DisplayConfig { + std::vector mPaths; + std::vector mModes; +}; + +std::optional GetDisplayConfig(); + extern bool HasScaledResolution(); typedef nsTArray> ScaledResolutionSet;