diff options
| author | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2023-01-31 10:57:26 +0100 |
|---|---|---|
| committer | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2023-02-10 23:50:21 +0100 |
| commit | ce7b4c734b78d24b75ecb389cf799ce85d0cc3bf (patch) | |
| tree | f3f953ccf6a438be941d7f04e7a8c7eb366e3dfa /src/plugins/sqldrivers/mysql/qsql_mysql.cpp | |
| parent | 08c201070817be73c17fa7e4e790ba08e94532c6 (diff) | |
Fix Qt 6 performance regression when painting outside device
Painting wide lines and filling would be clipped to cliprect (by
default, the device rect) only if the bounding rect coordinates
exceeded QT_RASTER_COORD_LIMIT. In Qt 6, that limit was raised from
2^15 to 2^23, so a lot of time could be spent on rasterizing elements
that would anyway be outside the rendering area.
Fix by instead clipping whenever the path to be painted overshoots the
cliprect by a significant margin. At this point, the path is already
flattened to straight lines, so clipping is quick and precise. Testing
indicates that this solution improves performance a lot when large
portions of the elements to be painted fall outside the cliprect,
while not causing significant performance hits otherwise.
As a side effect, it is then no longer necessary to test the bounding
rect explicitly against QT_RASTER_COORD_LIMIT, since we already make
sure that the clip rect we check against is within that limit.
Fixes: QTBUG-110595
Pick-to: 6.5 6.4 6.2
Change-Id: Iaf1afbb481c2d7059405f334278796ad46f5bcb6
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/plugins/sqldrivers/mysql/qsql_mysql.cpp')
0 files changed, 0 insertions, 0 deletions
