From c30a6232df03e1efbd9f3b226777b07e087a1122 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 12 Oct 2020 14:27:29 +0200 Subject: BASELINE: Update Chromium to 85.0.4183.140 Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen --- chromium/components/viz/demo/demo_main.cc | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'chromium/components/viz/demo/demo_main.cc') 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 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(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(this); x11_window->Initialize(std::move(props)); return x11_window; +#endif + NOTREACHED(); + return nullptr; +#elif defined(OS_WIN) + return std::make_unique(this, props.bounds); #else NOTIMPLEMENTED(); return nullptr; -- cgit v1.2.1