diff options
author | Arvid Nilsson <anilsson@blackberry.com> | 2013-12-13 15:57:26 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-31 17:31:13 +0100 |
commit | a4b0e2183c23c0173167833c75f0e2970f3ab524 (patch) | |
tree | 43d60fee79115c6634991696e3db1c152eafcc4a /src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp | |
parent | f55df93be18e990d6f8daf7f691c75303c57ad5f (diff) |
Quick: Support reparenting
To support reparenting, we make the compositing surface independent of
the window by using gfx::TEXTURE_TRANSPORT. We also need to be able to
keep frame data across window changes so we can reconstruct the QSGNode
tree in a new context, so extract that data into DelegatedFrameNodeData
class. Any context-specific data is still stored in DelegatedFrameNode.
Also hook up window changes to WebContents::WasShown/Hidden for Quick.
Remove checking of Qt isVisible state, this mechanism is used to sync
Chromium with Qt, not the other way around. WasShown/Hidden is
orthogonal to Show/Hide, and can use different triggers. However for
Widgets it probably makes sense to hook both up to widget visibility.
Change-Id: I1ef4b50cd61b8e54b791e03f0b41929c42fec8bf
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp')
-rw-r--r-- | src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp index c7b831853..d0bc44a5b 100644 --- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp +++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp @@ -111,12 +111,6 @@ bool RenderWidgetHostViewQtDelegateWidget::isVisible() const return QWidget::isVisible(); } -WId RenderWidgetHostViewQtDelegateWidget::nativeWindowIdForCompositor() const -{ - // The QtWidgets API doesn't support hardware acceleration. - return 0; -} - QWindow* RenderWidgetHostViewQtDelegateWidget::window() const { const QWidget* root = QWidget::window(); @@ -153,6 +147,11 @@ QVariant RenderWidgetHostViewQtDelegateWidget::inputMethodQuery(Qt::InputMethodQ return m_client->inputMethodQuery(query); } +bool RenderWidgetHostViewQtDelegateWidget::supportsHardwareAcceleration() const +{ + return false; +} + void RenderWidgetHostViewQtDelegateWidget::paintEvent(QPaintEvent * event) { QPainter painter(this); |