summaryrefslogtreecommitdiffstats
path: root/src/core/render_widget_host_view_qt.h
diff options
context:
space:
mode:
authorArvid Nilsson <anilsson@blackberry.com>2013-12-13 15:57:26 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-31 17:31:13 +0100
commita4b0e2183c23c0173167833c75f0e2970f3ab524 (patch)
tree43d60fee79115c6634991696e3db1c152eafcc4a /src/core/render_widget_host_view_qt.h
parentf55df93be18e990d6f8daf7f691c75303c57ad5f (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/core/render_widget_host_view_qt.h')
-rw-r--r--src/core/render_widget_host_view_qt.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/render_widget_host_view_qt.h b/src/core/render_widget_host_view_qt.h
index 6938b7060..861315e8a 100644
--- a/src/core/render_widget_host_view_qt.h
+++ b/src/core/render_widget_host_view_qt.h
@@ -48,6 +48,7 @@
#include "base/memory/weak_ptr.h"
#include "cc/resources/transferable_resource.h"
#include "content/browser/renderer_host/render_widget_host_view_base.h"
+#include "delegated_frame_node.h"
#include "ui/base/gestures/gesture_recognizer.h"
#include "ui/base/gestures/gesture_types.h"
#include <QMap>
@@ -171,7 +172,7 @@ public:
virtual void notifyResize() Q_DECL_OVERRIDE;
virtual bool forwardEvent(QEvent *) Q_DECL_OVERRIDE;
virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const Q_DECL_OVERRIDE;
- virtual void compositingSurfaceUpdated() Q_DECL_OVERRIDE;
+ virtual void windowChanged() Q_DECL_OVERRIDE;
void handleMouseEvent(QMouseEvent*);
void handleKeyEvent(QKeyEvent*);
@@ -221,8 +222,9 @@ private:
scoped_ptr<RenderWidgetHostViewQtDelegate> m_delegate;
BackingStoreQt *m_backingStore;
- scoped_ptr<cc::DelegatedFrameData> m_pendingFrameData;
- cc::TransferableResourceArray m_resourcesToRelease;
+ QExplicitlySharedDataPointer<DelegatedFrameNodeData> m_frameNodeData;
+ cc::ReturnedResourceArray m_resourcesToRelease;
+ bool m_needsDelegatedFrameAck;
uint32 m_pendingOutputSurfaceId;
WebContentsAdapterClient *m_adapterClient;
@@ -234,7 +236,6 @@ private:
size_t m_cursorPositionWithinSelection;
bool m_initPending;
- bool m_readyForSurface;
};
#endif // RENDER_WIDGET_HOST_VIEW_QT_H