From c91bba7af3215107916a135733dcf428f57a564f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCri=20Valdmann?= Date: Thu, 16 Aug 2018 11:10:33 +0200 Subject: Extract Compositor from RenderWidgetHostViewQt Split compositing-related functionality from RenderWidgetHostViewQt into a new class Compositor. Change-Id: I97b26a6057734cd8ce8c1df29b373888f7a07c1c Reviewed-by: Allan Sandfeld Jensen --- src/core/render_widget_host_view_qt.h | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'src/core/render_widget_host_view_qt.h') diff --git a/src/core/render_widget_host_view_qt.h b/src/core/render_widget_host_view_qt.h index 664359eb1..909b3bd84 100644 --- a/src/core/render_widget_host_view_qt.h +++ b/src/core/render_widget_host_view_qt.h @@ -58,8 +58,6 @@ #include #include -#include "delegated_frame_node.h" - QT_BEGIN_NAMESPACE class QAccessibleInterface; QT_END_NAMESPACE @@ -71,6 +69,8 @@ class RenderWidgetHostImpl; namespace QtWebEngineCore { +class Compositor; + struct MultipleMouseClickHelper { QPoint lastPressPosition; @@ -92,7 +92,6 @@ class RenderWidgetHostViewQt , public ui::GestureProviderClient , public RenderWidgetHostViewQtDelegateClient , public base::SupportsWeakPtr - , public viz::BeginFrameObserverBase #ifndef QT_NO_ACCESSIBILITY , public QAccessible::ActivationObserver #endif // QT_NO_ACCESSIBILITY @@ -173,10 +172,6 @@ public: void OnSelectionBoundsChanged(content::TextInputManager *text_input_manager, RenderWidgetHostViewBase *updated_view) override; void OnTextSelectionChanged(content::TextInputManager *text_input_manager, RenderWidgetHostViewBase *updated_view) override; - // cc::BeginFrameObserverBase implementation. - bool OnBeginFrameDerivedImpl(const viz::BeginFrameArgs& args) override; - void OnBeginFrameSourcePausedChanged(bool paused) override; - void handleMouseEvent(QMouseEvent*); void handleKeyEvent(QKeyEvent*); void handleWheelEvent(QWheelEvent*); @@ -213,7 +208,6 @@ public: gfx::Vector2dF lastScrollOffset() const { return m_lastScrollOffset; } private: - void sendDelegatedFrameAck(); void processMotionEvent(const ui::MotionEvent &motionEvent); void clearPreviousTouchMotionState(); QList mapTouchPointIds(const QList &inputPoints); @@ -234,15 +228,12 @@ private: QList m_previousTouchPoints; std::unique_ptr m_delegate; - QExplicitlySharedDataPointer m_chromiumCompositorData; - std::vector m_resourcesToRelease; - bool m_needsDelegatedFrameAck; + std::unique_ptr m_compositor; LoadVisuallyCommittedState m_loadVisuallyCommittedState; QMetaObject::Connection m_adapterClientDestroyedConnection; WebContentsAdapterClient *m_adapterClient; MultipleMouseClickHelper m_clickHelper; - viz::mojom::CompositorFrameSinkClient *m_rendererCompositorFrameSink; bool m_imeInProgress; bool m_receivedEmptyImeEvent; @@ -250,10 +241,6 @@ private: bool m_initPending; - std::unique_ptr m_beginFrameSource; - bool m_needsBeginFrames; - bool m_addedFrameObserver; - gfx::Vector2dF m_lastScrollOffset; gfx::SizeF m_lastContentsSize; SkColor m_backgroundColor; -- cgit v1.2.3