1 From d76f1575fd5abd31d488f7456700af0ead9712f0 Mon Sep 17 00:00:00 2001
2 From: Roger Zanoni <rzanoni@igalia.com>
3 Date: Fri, 30 Jun 2023 10:25:10 +0200
4 Subject: [PATCH 8/9] Add a method to check if the agl window is configured
7 ui/aura/agl/window_tree_host_agl.h | 1 +
8 ui/aura/agl/window_tree_host_platform_agl.cc | 4 ++++
9 ui/aura/agl/window_tree_host_platform_agl.h | 1 +
10 ui/platform_window/agl/platform_window_agl.h | 1 +
11 4 files changed, 7 insertions(+)
13 diff --git a/ui/aura/agl/window_tree_host_agl.h b/ui/aura/agl/window_tree_host_agl.h
14 index 858a078d939d0..b9aa451c8332e 100644
15 --- a/ui/aura/agl/window_tree_host_agl.h
16 +++ b/ui/aura/agl/window_tree_host_agl.h
17 @@ -35,6 +35,7 @@ class AURA_EXPORT WindowTreeHostAgl {
18 virtual void SetAglReady() {}
19 virtual void SetAglBackground() {}
20 virtual void SetAglPanel(uint32_t edge) {}
21 + virtual bool IsSurfaceConfigured() const { return false; }
25 diff --git a/ui/aura/agl/window_tree_host_platform_agl.cc b/ui/aura/agl/window_tree_host_platform_agl.cc
26 index e34595fe0ed9c..67190e1da6973 100644
27 --- a/ui/aura/agl/window_tree_host_platform_agl.cc
28 +++ b/ui/aura/agl/window_tree_host_platform_agl.cc
29 @@ -47,4 +47,8 @@ void WindowTreeHostPlatformAgl::SetAglPanel(uint32_t edge) {
30 window_tree_host_platform_->platform_window()->SetAglPanel(edge);
33 +bool WindowTreeHostPlatformAgl::IsSurfaceConfigured() const {
34 + return window_tree_host_platform_->platform_window()->IsSurfaceConfigured();
38 diff --git a/ui/aura/agl/window_tree_host_platform_agl.h b/ui/aura/agl/window_tree_host_platform_agl.h
39 index 181eefae346f7..e5a29fa1bfca3 100644
40 --- a/ui/aura/agl/window_tree_host_platform_agl.h
41 +++ b/ui/aura/agl/window_tree_host_platform_agl.h
42 @@ -41,6 +41,7 @@ class AURA_EXPORT WindowTreeHostPlatformAgl : public aura::WindowTreeHost {
43 void SetAglReady() override;
44 void SetAglBackground() override;
45 void SetAglPanel(uint32_t edge) override;
46 + bool IsSurfaceConfigured() const override;
49 aura::WindowTreeHostPlatform* window_tree_host_platform_;
50 diff --git a/ui/platform_window/agl/platform_window_agl.h b/ui/platform_window/agl/platform_window_agl.h
51 index 4bc915d663e72..cab1f42272772 100644
52 --- a/ui/platform_window/agl/platform_window_agl.h
53 +++ b/ui/platform_window/agl/platform_window_agl.h
54 @@ -29,6 +29,7 @@ class PlatformWindowAgl {
55 virtual void SetAglReady() {}
56 virtual void SetAglBackground() {}
57 virtual void SetAglPanel(uint32_t edge) {}
58 + virtual bool IsSurfaceConfigured() { return false; }