aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Quick: Use devicePixelRatioF rather than devicePixelRatioUlf Hermann2018-07-121-2/+2
| | | | | | | | | | The integer version of devicePixelRatio cannot handle fractional ratios and will lead to arithmetic exceptions for ratios between 0 and 1. Change-Id: I4a06a12742fa85e6d2f0e24193ae796dec7e2f15 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Software render: Fix warnings floodFriedemann Kleint2018-02-191-0/+1
| | | | | | | | | | Add missing QPainter::end(), fixing: QBackingStore::endPaint() called with active painter on backingstore paint device Task-number: QTBUG-66452 Change-Id: Ia00e61953528b15015b3e41ba1868e670818cf14 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-241-1/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/compiler/qv4codegen.cpp src/qml/compiler/qv4compileddata_p.h src/qml/debugger/qqmlprofiler_p.h src/qml/jsruntime/qv4engine.cpp src/qml/memory/qv4mm.cpp src/qml/qml/qqmlcomponent.cpp src/qml/qml/qqmlobjectcreator.cpp src/qml/qml/qqmlobjectcreator_p.h src/qml/types/qqmldelegatemodel.cpp src/quick/items/qquickitem_p.h src/quick/items/qquickwindow.cpp tests/auto/quick/touchmouse/BLACKLIST tests/benchmarks/qml/holistic/tst_holistic.cpp Change-Id: I520f349ab4b048dd337d9647113564fc257865c2
| * QSGSoftwarePixmapRenderer: Fix incorrect background coordinatesJüri Valdmann2018-01-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The pixmap renderer sets up QPainter's window coordinates system but still positions the background node in device coordinates. If the window rectangle is QRect(x, y, w, h) then the background rectangle will be set to QRect(0, 0, w, h). As the rendering output is clipped to the background rectangle, this means that the image will be left with transparent bands of x pixels on the right and y pixels on the bottom. Task-number: QTBUG-62867 Change-Id: I3b2c18dafda4381b0daa64f849330f51bcc743b2 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | sources: Add missing override and remove redundant virtualAlexander Volkov2017-02-231-1/+1
|/ | | | | | | Change-Id: I48e26b1491024d41ebf75d40f0d1a7e9a1b20f22 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix crash when using Software Renderer on HiDPI QBackingStoreAndy Nichols2016-09-151-2/+11
| | | | | | | | | | | | For some reason the QPaintDevice of a QBackingStore is not valid on HiDPI QBackingStores until QBackingStore::begin() has been called. I suspect this is a bug in qtbase, but until this is fixed this change will make sure that the paint device will always be valid, even in this unusual situation. Task-number: QTBUG-55875 Change-Id: I63137d0de9b68d29bfcf86d1807f576923875b5d Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* software: Add support for QSGRenderNodeLaszlo Agocs2016-07-191-0/+4
| | | | | | | | | | | | | | | | | 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>
* Fix rendercontrol grabs with the software backendLaszlo Agocs2016-07-151-0/+5
| | | | | | | | | | | | 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-5/+26
| | | | | | | | | | | | | | | | | 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>
* QQuickWidget: Partial update support with software renderingAndy Nichols2016-04-201-1/+2
| | | | | Change-Id: I886287812c1c3cd56739e24470492adc90cfafbb Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* 2DRenderer: Have renderers tied to QPaintDeviceAndy Nichols2016-04-201-52/+19
| | | | | | | | | | | Previously the software renderer would create a backing store for a given window if one was needed. This has been moved to the render loop where the backingstore is flushed to the window. This refactoring should make the software renderers flexible enough to work with QQuickRenderControl. Change-Id: Idbbb1da870afbf28e45213a887be68dba11dc592 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Enable building Qt Quick module with QT_NO_OPENGL definedAndy Nichols2016-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Currently the Qt Quick module depends on either the OpenGL or OpenGLES headers being available at build time. Since we are adding support for adaptations that do not depend on OpenGL, it should be possible to build Qt Quick in environments that do not have OpenGL development headers. This does present many challenges though because in some cases GL types, and classes that require OpenGL are part of the public APIs. However since these classes were never available when QT_NO_OPENGL was defined, it should be possible to redefine the function signatures under this scenario, since it's not possible to break binary compatibility if there never were any binaries to break compatibility with. One of the bigger changes that was necessary to facilitate this change is creating interfaces out of QSGContext and QSGRenderContext. Here the default behavior was usage of OpenGL directly, even though subclasses could override all OpenGL usage. Making them interfaces should bring QSGContext and QSGRenderContext more in line with the other classes present in the adaptation layer. Change-Id: Iaa54dc0f6cfd18d2da1d059548abf509bd71f200 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Turn the SoftwareContext plugin into the Scenegraph Software AdaptationAndy Nichols2016-03-101-0/+158
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>