Commit Graph

8 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
Shawn Rutledge 499ec43937 use nullptr consistently (clang-tidy)
From now on we prefer nullptr instead of 0 to clarify cases where
we are assigning or testing a pointer rather than a numeric zero.

Also, replaced cases where 0 was passed as Qt::KeyboardModifiers
with Qt::NoModifier (clang-tidy replaced them with nullptr, which
waas wrong, so it was just as well to make the tests more readable
rather than to revert those lines).

Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-02-26 07:13:18 +00:00
Liang Qi 15dd1b7883 Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
	src/qml/qml/qqmlimport.cpp
	src/qml/qml/qqmlimport_p.h
	src/qml/qml/qqmltypenamecache.cpp

Done-with: Ulf Hermann<ulf.hermann@qt.io>
Change-Id: I41ba7a592b2659ddf53da6952ea3b456a7bba319
2017-10-24 11:13:09 +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
Laszlo Agocs bf7c622626 software backend: Fix clipping of QSGRenderNodes
Change-Id: I27aa5f94165fb07807d2bb711d81eade552b9f76
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-12-21 13:59:03 +00:00
Laszlo Agocs 584c90df98 QSGRendererInterface: Add Resource suffix for consistency
Change-Id: I60e674760725d4c4dd13f53b31c3abb6b09c1790
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-11-18 13:14:25 +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