summaryrefslogtreecommitdiff
path: root/chromium/ui/aura/window_tree_host_platform.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2022-05-12 15:59:20 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2022-05-25 06:57:22 +0000
commitf7eaed5286974984ba5f9e3189d8f49d03e99f81 (patch)
treecaed19b2af2024f35449fb0b781d0a25e09d4f8f /chromium/ui/aura/window_tree_host_platform.cc
parent9729c4479fe23554eae6e6dd1f30ff488f470c84 (diff)
downloadqtwebengine-chromium-f7eaed5286974984ba5f9e3189d8f49d03e99f81.tar.gz
BASELINE: Update Chromium to 100.0.4896.167
Change-Id: I98cbeb5d7543d966ffe04d8cefded0c493a11333 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/ui/aura/window_tree_host_platform.cc')
-rw-r--r--chromium/ui/aura/window_tree_host_platform.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/chromium/ui/aura/window_tree_host_platform.cc b/chromium/ui/aura/window_tree_host_platform.cc
index e80c9dd023f..ac84fc9ecae 100644
--- a/chromium/ui/aura/window_tree_host_platform.cc
+++ b/chromium/ui/aura/window_tree_host_platform.cc
@@ -13,6 +13,7 @@
#include "build/build_config.h"
#include "ui/aura/client/cursor_client.h"
#include "ui/aura/env.h"
+#include "ui/aura/host_frame_rate_throttler.h"
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/aura/window_tree_host_observer.h"
@@ -32,7 +33,7 @@
#include "ui/ozone/public/ozone_platform.h"
#endif
-#if defined(OS_WIN)
+#if BUILDFLAG(IS_WIN)
#include "ui/platform_window/win/win_window.h"
#endif
@@ -71,7 +72,7 @@ void WindowTreeHostPlatform::CreateAndSetPlatformWindow(
#if defined(USE_OZONE)
platform_window_ = ui::OzonePlatform::GetInstance()->CreatePlatformWindow(
this, std::move(properties));
-#elif defined(OS_WIN)
+#elif BUILDFLAG(IS_WIN)
platform_window_ = std::make_unique<ui::WinWindow>(this, properties.bounds);
#else
NOTIMPLEMENTED();
@@ -294,4 +295,11 @@ void WindowTreeHostPlatform::OnOcclusionStateChanged(
SetNativeWindowOcclusionState(aura_occlusion_state, {});
}
+void WindowTreeHostPlatform::SetFrameRateThrottleEnabled(bool enabled) {
+ if (enabled)
+ HostFrameRateThrottler::GetInstance().AddHost(this);
+ else
+ HostFrameRateThrottler::GetInstance().RemoveHost(this);
+}
+
} // namespace aura