[Qgis-developer] Multi-threading rendering merged to master
larrys at dakotacarto.com
Wed Feb 26 11:44:24 PST 2014
Hi Martin and Mathieu,
On Wed, Feb 26, 2014 at 6:41 AM, Mathieu Pellerin <nirvn.asia at gmail.com>wrote:
> Happy to report that following Martin's last commit (
> I cannot see any issues with vector/raster layer rendering, as well as
> labelling. All renders like 2.2, except the user experience is 10 times
> better :)
> Larry, I'm pretty sure your labeling tests will mostly turn green now.
Yes and no. :-)
The server and composer tests, and comparisons with canvas output ,seem to
pass OK now, but not so for the canvas . Now, I don't know if it is the
unit test setup that needs updated to work with new QgsMapSettings or
something in PAL, so I have to do some investigation first.
On Wed, Feb 26, 2014 at 3:59 PM, Martin Dobias <wonder.sk at gmail.com> wrote:
> Hi Larry
> On Tue, Feb 25, 2014 at 5:55 AM, Larry Shaffer <larrys at dakotacarto.com>
> > Hi Martin,
> > This is just awesome work!
> > Unfortunately, all but the simplest labeling tests (default labels of mm
> > unit) fail, especially any that utilize labels in map units. In your
> > forthcoming detailed description of changes you mentioned, could you add
> > some info on what may have changed with regards to output resolution?
> I am sorry about that, but I am sure we can sort it out in the next
> few days. Mathieu has done a great job testing post-MTR rendering and
> reporting regressions, just today he has added #9661 and #9662 - maybe
> these are the issues causing the tests fail.
> The main change is that doing size/width calculations should get
> simpler now, because the "scale factor" and "raster scale factor" are
> now always equal to one (so we do not need to use them anymore) and
> there is just one true DPI (instead of two DPIs - painter DPI and
> scene DPI). I know that labeling had to do some voodoo to get the
> rendering right, I remember updating that code, but maybe I missed
> some pieces....
Hmm. I didn't figure everything would go smoothly. :-)
Stripping out all the vector and raster scale adjustments from labeling
will be great.
But, the code removed in  is exactly the only thing that I thought I
would need to leave in. It is used to find the difference in dpi from a
native, local painter, versus the current render context. That is in turn
used by the drop shadow and other functions to make sure their output
matches the current painter's scale, since I leverage a local painter and
QPicture to generate the silhouette of the label component, which is the
basis for the drop shadow.
Do you know of a way to effectively copy the main painter to a local one?
Does the new renderer setup offer a means to duplicate the painter?
Might have to switch the whole operation over to using Qt 4.6+
QGraphicsEffect drop shadows for QGraphicItems (tried that first, but had
odd results). Could work better now with the new renderer setup.
I won't be able to verify the issues that removing the noted code produces
until I am done adding many more unit tests.
I'm looking at adding two more unit test rendercheckers: composer export to
PDF and SVG, then rasterize those back to PNG for comparing against
composer and canvas outputs. This means for every individual labeling unit
test, the following suite will be auto-generated:
* canvas (done)
* server (done)
* composer image (done)
* composer PDF
* composer SVG
* server vs. canvas (done)
* composer image vs. canvas (done, but has double anti-aliasing issue)
* composer PDF vs. composer image [and canvas?]
* composer SVG vs. composer image [and canvas?]
All outputs that support different resolutions should also have suites
associated with a likely range that may expose issues, e.g. 72, 150, 300
dpi. Needless to say, many of these tests will have varying allowable
tolerances, given font differences across platforms.
The focus, at least for me, is to have the unit tests point towards glaring
issues with QGIS code, not precisely solve cross-platform font issues nor
have all output match cross-platform. Ideally, they should help ensure
user's output is generally WYSIWYG in day-to-day usage.
For rendering PDF back to PNG for cross-checking, I am looking at muPDF and
poppler libs , both recommended by the Qt project . There is also
pdf2image , but that depends upon ghostscript.
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Qgis-developer