diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-01-25 17:27:42 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-03-01 12:06:28 +0000 |
commit | 70d3a577aeefb298df97028acc7018b745116e98 (patch) | |
tree | 68897c54efb15bc7ebcd96486e2224080b3226e8 /src/core/render_widget_host_view_qt.h | |
parent | 8fcb5e2e0da39588de5f2318e0a62a265f30c6bd (diff) |
Add beginFrameProvider
We now need to tick/sync frames ourselves. This provides a quick way
to do that without touching too much code.
Change-Id: I3820d7ef8dbc8e3a224a48ee28c489bb830bb1da
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core/render_widget_host_view_qt.h')
-rw-r--r-- | src/core/render_widget_host_view_qt.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/render_widget_host_view_qt.h b/src/core/render_widget_host_view_qt.h index 6fc655f09..8871d88ce 100644 --- a/src/core/render_widget_host_view_qt.h +++ b/src/core/render_widget_host_view_qt.h @@ -43,6 +43,7 @@ #include "render_widget_host_view_qt_delegate.h" #include "base/memory/weak_ptr.h" +#include "cc/scheduler/begin_frame_source.h" #include "cc/resources/transferable_resource.h" #include "content/browser/accessibility/browser_accessibility_manager.h" #include "content/browser/renderer_host/render_widget_host_view_base.h" @@ -99,6 +100,7 @@ class RenderWidgetHostViewQt , public ui::GestureProviderClient , public RenderWidgetHostViewQtDelegateClient , public base::SupportsWeakPtr<RenderWidgetHostViewQt> + , public cc::BeginFrameObserverBase #ifndef QT_NO_ACCESSIBILITY , public QAccessible::ActivationObserver #endif // QT_NO_ACCESSIBILITY @@ -157,6 +159,7 @@ public: virtual void ClearCompositorFrame() Q_DECL_OVERRIDE; virtual void LockCompositingSurface() Q_DECL_OVERRIDE; virtual void UnlockCompositingSurface() Q_DECL_OVERRIDE; + virtual void SetNeedsBeginFrames(bool needs_begin_frames) Q_DECL_OVERRIDE; // Overridden from RenderWidgetHostViewBase. virtual void SelectionChanged(const base::string16 &text, size_t offset, const gfx::Range &range) Q_DECL_OVERRIDE; @@ -174,6 +177,10 @@ public: virtual bool forwardEvent(QEvent *) Q_DECL_OVERRIDE; virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) Q_DECL_OVERRIDE; + // cc::BeginFrameObserverBase implementation. + bool OnBeginFrameDerivedImpl(const cc::BeginFrameArgs& args) override; + void OnBeginFrameSourcePausedChanged(bool paused) override; + void handleMouseEvent(QMouseEvent*); void handleKeyEvent(QKeyEvent*); void handleWheelEvent(QWheelEvent*); @@ -209,6 +216,7 @@ private: void clearPreviousTouchMotionState(); QList<QTouchEvent::TouchPoint> mapTouchPointIds(const QList<QTouchEvent::TouchPoint> &inputPoints); float dpiScale() const; + void updateNeedsBeginFramesInternal(); bool IsPopup() const; @@ -238,6 +246,10 @@ private: bool m_initPending; + std::unique_ptr<cc::SyntheticBeginFrameSource> m_beginFrameSource; + bool m_needsBeginFrames; + bool m_addedFrameObserver; + gfx::Vector2dF m_lastScrollOffset; gfx::SizeF m_lastContentsSize; |