aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/adaptations/software/qsgabstractsoftwarerenderer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Mark layers in the SW rasterizer as opaque if possibleLars Knoll2017-11-031-0/+6
| | | | | | | | | | If the content of a layer completely covers every pixel of it, mark that layer as opaque so that we can avoid alpha blending where possible. Change-Id: Ia0be4e7a96ecddd31a26f353509de976bcc9e397 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Volker Krause <volker.krause@kdab.com>
* Improve dirty region calculation in software rendererJüri Valdmann2017-05-231-4/+4
| | | | | | | | | | | | | | | | | | | | | The software renderers dirty region calculation is done in integral logical coordinates, which leads to quite some trouble when handling scene graph elements with fractional coordinates (used by WebEngine for example). The optimal solution would probably be to either use integral physical coordinates or floating point logical coordinates, however this would seem to require substantial changes to QPainter and QBackingStore and so on. So, this patch instead changes the calculation to use something like interval arithmetic: instead of just rounding each logical coordinate to the nearest integer the renderer now uses (very carefully) both the upper and lower boundaries to make sure that the dirty regions always err on the side of caution. I expect this change to make rendering slower but only in situations where previously there would be rendering errors. Task-number: QTBUG-60393 Change-Id: I7f8e7d2739c810328c841130df9c1c7332439447 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Quick: fix incorrect usage of 'range for' with Qt containersAnton Kudryavtsev2016-08-201-3/+1
| | | | | | | Also port remaining foreach to 'range for'. Change-Id: I20296bb3bb6d63f144ebddaba02cabeb16b7d734 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix rendercontrol grabs with the software backendLaszlo Agocs2016-07-151-1/+6
| | | | | | | | | | | | Calling grabWindow recurses (since that is implemented via QQuickRenderControl::grab...) so it's not an option. Instead, call directly in the software renderer implementation. Fix also the size of the offscreen QQuickWindow when using QQuickWidget in combination with the software backend. Change-Id: I857a2cc0aebbbaa5d52d809aeaec37c15b0787b9 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Software Renderer: Call QBackingStore::beginPaint with correct QRegionAndy Nichols2016-06-201-1/+5
| | | | | | | | | | | | | | | | | When rendering into QBackingStores, it is important to let the backingstore know what region you intended to paint into before you start rendering. Previously we were calling QBackingStore::beginPaint on the whole window area, but then only rendering and flushing for a subset of that area. This causes issues on platforms that depend on QBackingStore::beginPaint to be all area that will be repainted before the next flush, so that they can for example clear those areas. This change required a bit of extra plumbing in the Software Renderer, but now it is possible to calculate the area that will be repainted before painting it, and pass that region to QBackingStore::beginPaint(). Change-Id: I90be1916ebbe8fc182cd13246bb6690cc7e16d27 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* 2DRenderer: Mark all regions of deleted node as dirtyAndy Nichols2016-04-131-1/+1
| | | | | | | | | | | | Previous behavior was to always subtract the current bounding rect of items when calculating the previous dirty region. When you remove a node though, there is no current bounding rect because the item no longer exists. The last valid boundingRect was use instead, which led to the previous bounding rect to not get marked as dirty when the node was removed. Change-Id: Ic1a4f872d4d46125b06e2588aae695b8ff67d0fd Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Turn the SoftwareContext plugin into the Scenegraph Software AdaptationAndy Nichols2016-03-101-0/+321
The 2D renderer will now become a built-in adaptation of scenegraph that should always be available to fallback to when there are no other renders available. So rather than be an external plugin, now it is a built in adaptation. Change-Id: Ifa02fd50f3085ad1e6f1a73c3ce1e1825b677cc7 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>