[Qgis-developer] Patch for screen updates during long rendering
operations
Marco Hugentobler
marco.hugentobler at karto.baug.ethz.ch
Sat Dec 15 10:06:23 EST 2007
Hi qgis devs,
Some time ago I sent a proof-of-concept patch that restored screen updates
during rendering.
Now I generated an improved patch that also restores screen updates but it is
done with less code changes (so simpler and closer to svn trunk code).
Screen updates during rendering operations can be turned on by entering a
value != 0 in Settings -> Options -> Rendering -> Update Display after
rendering xxx features. The basic principle is that layers may emit the
signal 'screenUpdateRequested()' such that the current rendering status shown
in the qgis map window.
Also, the patch uses two Mutexes. One to protect the main rendering loop such
that only one thread may render at one time. And the second to handle the
problems when resizing the map window. The problem with resizing is that many
refresh requests may arrive in short time. The solution implemented in the
patch is that there is a waiting list where rejected threads leave their
sizes. Then the mapcanvas considers only the last entry (which is the most
important one) as soon as it is not busy with rendering any more. Therefore
resizing should now also work properly for WMS layers.
On my todo list (but not implemented yet) is the possibility to stop the
rendering. I plan to do this by introducing a QgsRenderingContext object, as
suggested by Martin in an earlier Mail.
Please test the patch and report your experiences on the list.
Cheers,
Marco
--
Dr. Marco Hugentobler
Institute of Cartography
ETH Zurich
Technical Advisor QGIS Project Steering Committee
marco.hugentobler at karto.baug.ethz.ch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qgis_screen_update.diff
Type: text/x-diff
Size: 12337 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/qgis-developer/attachments/20071215/d6546897/qgis_screen_update.bin
More information about the Qgis-developer
mailing list