diff options
author | Jüri Valdmann <juri.valdmann@qt.io> | 2019-12-12 12:31:12 +0100 |
---|---|---|
committer | Jüri Valdmann <juri.valdmann@qt.io> | 2019-12-12 12:35:29 +0000 |
commit | db19ca9c53c843ae33634dc543d0c22e24733e10 (patch) | |
tree | d82f48662e43940a4252a65f68840fe905fec0c1 | |
parent | 819bf79725a2c704123ef00ad507757187cccc61 (diff) | |
download | qtwebengine-chromium-db19ca9c53c843ae33634dc543d0c22e24733e10.tar.gz |
Fix FlingScheduler in viz mode
FlingScheduler needs access to our ui::Compositor in RWHVQt if in viz mode.
Task-number: QTBUG-80089
Change-Id: I1628cb7bbeca95101ae0db83a559c3ff56cbadc6
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r-- | chromium/content/browser/renderer_host/input/fling_scheduler.cc | 4 | ||||
-rw-r--r-- | chromium/content/public/browser/render_widget_host_view.h | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/chromium/content/browser/renderer_host/input/fling_scheduler.cc b/chromium/content/browser/renderer_host/input/fling_scheduler.cc index cf220cb41b0..993efe1e07b 100644 --- a/chromium/content/browser/renderer_host/input/fling_scheduler.cc +++ b/chromium/content/browser/renderer_host/input/fling_scheduler.cc @@ -71,6 +71,10 @@ void FlingScheduler::ProgressFlingOnBeginFrameIfneeded( } ui::Compositor* FlingScheduler::GetCompositor() { +#if defined(TOOLKIT_QT) + if (host_->GetView()) + return host_->GetView()->GetCompositor(); +#endif #if defined(USE_AURA) if (host_->GetView() && host_->GetView()->GetNativeView() && host_->GetView()->GetNativeView()->GetHost() && diff --git a/chromium/content/public/browser/render_widget_host_view.h b/chromium/content/public/browser/render_widget_host_view.h index 07d4351d0a8..541d7bf524b 100644 --- a/chromium/content/public/browser/render_widget_host_view.h +++ b/chromium/content/public/browser/render_widget_host_view.h @@ -27,6 +27,9 @@ class Size; namespace ui { enum class DomCode; class TextInputClient; +#if defined(TOOLKIT_QT) +class Compositor; +#endif } namespace viz { @@ -109,6 +112,10 @@ class CONTENT_EXPORT RenderWidgetHostView { virtual gfx::NativeView GetNativeView() = 0; virtual gfx::NativeViewAccessible GetNativeViewAccessible() = 0; +#if defined(TOOLKIT_QT) + virtual ui::Compositor *GetCompositor() { return nullptr; } +#endif + // Returns a ui::TextInputClient to support text input or nullptr if this RWHV // doesn't support text input. // Note: Not all the platforms use ui::InputMethod and ui::TextInputClient for |