[poppler] Followup Bug 32349 & Poppler: More shading fun ;-)

Andrea Canciani ranma42 at gmail.com
Mon Jan 24 12:44:53 PST 2011


On Sun, Jan 23, 2011 at 9:36 PM, Albert Astals Cid <aacid at kde.org> wrote:
> A Diumenge, 23 de gener de 2011, Thomas Freitag va escriure:
>> Am 23.01.2011 18:12, schrieb Albert Astals Cid:
>> > A Dissabte, 15 de gener de 2011, Thomas Freitag va escriure
>> >
>> >> The memory problems were coming still from the wrong calculation of
>> >> shading extension which I took from Gfx.cc and tried to correct, but it
>> >> still leaded to huge circles. Andrea gave me a hint of a correct
>> >> calculation of radial shading extension in cairo, and I adapated that
>> >> code piece now successfully to Splash. It seems, as if with this the
>> >> memory problems are now gone, at least I could render every PDF You sent
>> >> me in the past, and I couldn't find any regressions in the rendering
>> >> results.
>> >
>> > I got a new regression, will send you privately the pdf file.
>> >
>> > The question now is, you want me to try the other newest patch? Or you
>> > want to fix this "old" one?
>>
>> Please test the newest patch. It has a completely other algorithm and as
>> I already tested, it has not this regression and hopefully no other. I
>> 'll answer the other mails in a few seconds.
>
> Ok, i'll run the regtest on that.

If that passes the regtest, this patchset should pass it as well.

0001, 0002 and 0003 are fixes and cleanups for poppler Functions.

0004 abstracts a common interface from axial and radial shadings

0005 is not completely clear to me. I think it forces antialiasing to be
applied on shadings.

In 0006 I cleaned up the radial implementation by Thomas. In particular
I simplified the code which chooses one of the two solutions.

0007 const-ifies Matrix methods and adds norm() and determinant().

0008 adds simple caching (with uniform sampling) with a number of
samples which depends on the shading extents. It guarantees correct
rendering and provides much better performance than an hardcoded
constant (for example 65536 caused performance regressions with
respect to no caching at all in the ducks&roses pdf).
I left in some debugging code which is helpful while testing the
performance, because it prints the cache size extimate and if the cache
was activated or not.

0009 improves the parameter range estimate (in 0007 it is assumed to be
the full range). This might provide a speedup in some very particular
pdf files, but so far I haven't found any in which it actually matters.

Commit messages and authorship are to be fixed. I haven't implemented
the non-uniform sampling because I had some problem with clipping
to the domain and range, but it can be solved and I hope to do it soon.

I'd like to get a confirmation that the cache is working (i.e. it speeds up
the documents which the radial gradient patch slows down and causes
no rendering regressions).
Please remember that this patchset also affects axial shadings, which
should become faster as well.

Andrea
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-stitching-function-ouput-size.patch
Type: application/octet-stream
Size: 676 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20110124/a1078de2/attachment-0009.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Remove-cache-from-PostScriptFunction.patch
Type: application/octet-stream
Size: 4709 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20110124/a1078de2/attachment-0010.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Make-PSStack-stack-allocated.patch
Type: application/octet-stream
Size: 2344 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20110124/a1078de2/attachment-0011.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Abstract-GfxSimpleShading.patch
Type: application/octet-stream
Size: 9641 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20110124/a1078de2/attachment-0012.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-Improve-splash-rendering.patch
Type: application/octet-stream
Size: 4601 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20110124/a1078de2/attachment-0013.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-Implement-radial-and-abstract-simple-shadings-in-spl.patch
Type: application/octet-stream
Size: 11558 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20110124/a1078de2/attachment-0014.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-Add-Matrix-norm-method.patch
Type: application/octet-stream
Size: 2197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20110124/a1078de2/attachment-0015.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-Add-simple-caching.patch
Type: application/octet-stream
Size: 9183 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20110124/a1078de2/attachment-0016.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0009-Parameter-range-computation.patch
Type: application/octet-stream
Size: 14157 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20110124/a1078de2/attachment-0017.obj>


More information about the poppler mailing list