Commit Graph

5 Commits

Author SHA1 Message Date
Laszlo Agocs dd523fcb00 rendernode example: Prevent gui-render thread data race
By taking things like the item width and height in updatePaintNode()
(while gui is locked).

Change-Id: I840c6c858a0478eb6ceb09653fd1e033cb54372d
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2019-09-08 09:41:49 +02:00
Kai Koehne ea6cd0de3c Fix outdated BSD license header
Change-Id: Icc08925454445fc9497fb3bfd2c26efe90605983
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2017-10-17 11:18:11 +00:00
Shawn Rutledge 286dbc48bd softwarerenderer example: fix ambiguous reference to QQuickItem
GCC 6 says (with paths trimmed)
In file included from customrenderitem.cpp:47:0:
softwarerenderer.h:51:35: error: expected ')' before '*' token
softwarerenderer.h:61:5: error: reference to 'QQuickItem' is ambiguous

Change-Id: I70b328426ac48f5f6140d1ad4f015858979b99a5
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-08-17 20:11:38 +00:00
Laszlo Agocs 44e86f7012 Add optional flags and rect to QSGRenderNode
Having rendernodes triggering fullscreen updates with the software backend
is not ideal. Therefore, introduce the option of reporting that the rendernode
is well-behaving, meaning it only writes inside the reported bounding rectangle.

Similarly, the OpenGL batch renderer can keep using the depth buffer when the
rendernode is known to behave like the renderer expects.

Change-Id: I6acc434432c2504776f26e8917b5434b44be293d
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2016-08-02 16:15:31 +00:00
Laszlo Agocs 4cb2552313 software: Add support for QSGRenderNode
Have to change getResource() a bit since it turns out it is not suitable
currently for backends that do not have a per-window rendercontext and do
not implement the interface on the rendercontext. Pass in the window to
make sure it can always figure out which window we want the resources for.
(we do not want rendererInterface() to return window-specific instances
created on the fly, with ownership issues, so stick with the simple model
where backends implement the interface on one of their existing classes)

To support clipping, QSGRenderNode::RenderState is extended accordingly.
Also updated the docs since some claims in the rendernode docs are not true
since Qt 5.3.

Change-Id: I34779c83926f5231b888fcab7131e873ae97964f
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-07-19 10:40:55 +00:00