diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-12 14:27:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:35:20 +0000 |
commit | c30a6232df03e1efbd9f3b226777b07e087a1122 (patch) | |
tree | e992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/components/viz/demo | |
parent | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff) | |
download | qtwebengine-chromium-85-based.tar.gz |
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/components/viz/demo')
-rw-r--r-- | chromium/components/viz/demo/demo_main.cc | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/chromium/components/viz/demo/demo_main.cc b/chromium/components/viz/demo/demo_main.cc index f470f6c7d47..6de8e394c3d 100644 --- a/chromium/components/viz/demo/demo_main.cc +++ b/chromium/components/viz/demo/demo_main.cc @@ -20,6 +20,7 @@ #include "mojo/core/embedder/scoped_ipc_support.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/pending_remote.h" +#include "ui/base/ui_base_features.h" #include "ui/events/platform/platform_event_source.h" #include "ui/platform_window/platform_window.h" #include "ui/platform_window/platform_window_delegate.h" @@ -30,7 +31,6 @@ #endif #if defined(OS_WIN) -#include "ui/base/cursor/cursor_loader_win.h" #include "ui/platform_window/win/win_window.h" #endif @@ -85,7 +85,8 @@ class InitUI { public: InitUI() { #if defined(USE_X11) - XInitThreads(); + if (!features::IsUsingOzonePlatform()) + XInitThreads(); #endif event_source_ = ui::PlatformEventSource::CreateDefault(); } @@ -117,15 +118,22 @@ class DemoWindow : public ui::PlatformWindowDelegate { std::unique_ptr<ui::PlatformWindow> CreatePlatformWindow( const gfx::Rect& bounds) { ui::PlatformWindowInitProperties props(bounds); +#if defined(USE_X11) || defined(USE_OZONE) #if defined(USE_OZONE) - return ui::OzonePlatform::GetInstance()->CreatePlatformWindow( - this, std::move(props)); -#elif defined(OS_WIN) - return std::make_unique<ui::WinWindow>(this, props.bounds); -#elif defined(USE_X11) + if (features::IsUsingOzonePlatform()) { + return ui::OzonePlatform::GetInstance()->CreatePlatformWindow( + this, std::move(props)); + } +#endif +#if defined(USE_X11) auto x11_window = std::make_unique<ui::X11Window>(this); x11_window->Initialize(std::move(props)); return x11_window; +#endif + NOTREACHED(); + return nullptr; +#elif defined(OS_WIN) + return std::make_unique<ui::WinWindow>(this, props.bounds); #else NOTIMPLEMENTED(); return nullptr; |