diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-10-15 13:59:17 +0200 |
---|---|---|
committer | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-11-25 16:27:18 +0100 |
commit | 3a7674a1b6901826a70b54eab5c9312ecd0d6052 (patch) | |
tree | 599e000eed26b3708d54dc26dc5255e6e8f849a7 /src/core/render_widget_host_view_qt_delegate.h | |
parent | 3f08d8a506241bf9b9cdfb2be37f8a3868869adf (diff) |
Avoid relying on QOpenGL classes to handle RenderPasses
Use QSGLayer and get rid of RenderPassTexture so that we can render
intermediate layers with the QtQuick 2D Renderer.
This reintroduces the private dependency on QtQuick since the
QSGLayer factory methods aren't available publically, and also that
we need to use QSGImageNode instead of QSGSimpleTextureNode to use
them.
Since we can't subclass QSGLayer to hold a reference to SG objects
directly in the nodes that use them, store them all in the wrapping
DelegatedFrameNode in a SGObjects structs. This works assuming that
the DelegatedFrameNode will always be at the root of our nodes,
layers and textures; if the scene graph destroys the
DelegatedFrameNode all child nodes will be destroyed with it.
Change-Id: Iedeceb8f98eb54fd8228a677c366d6df9a270e11
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Diffstat (limited to 'src/core/render_widget_host_view_qt_delegate.h')
-rw-r--r-- | src/core/render_widget_host_view_qt_delegate.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/render_widget_host_view_qt_delegate.h b/src/core/render_widget_host_view_qt_delegate.h index 3f6d9caac..7b9a3e16c 100644 --- a/src/core/render_widget_host_view_qt_delegate.h +++ b/src/core/render_widget_host_view_qt_delegate.h @@ -46,6 +46,8 @@ QT_BEGIN_NAMESPACE class QCursor; class QEvent; class QPainter; +class QSGImageNode; +class QSGLayer; class QSGNode; class QVariant; class QWindow; @@ -78,6 +80,8 @@ public: virtual void hide() = 0; virtual bool isVisible() const = 0; virtual QWindow* window() const = 0; + virtual QSGLayer *createLayer() = 0; + virtual QSGImageNode *createImageNode() = 0; virtual void update() = 0; virtual void updateCursor(const QCursor &) = 0; virtual void resize(int width, int height) = 0; |