Commit graph

10 commits

Author SHA1 Message Date
Chris Wilson
efdb53425e [qt] Discard impossible status return from path construction
As we never return an error status during the path construction, we can
use the return value for the QPainterPath instead, greatly simplifying the
callers.
2009-08-29 17:07:36 +01:00
Chris Wilson
d1b8e260d4 [qt] Fix compilation
Enabling 'FAST CLIP' appears to trigger an infinite loop so disable.

Enabling 'FAST FILL' has limited effect on performance, so disable whilst
the basic QT surface is improved.
2009-08-10 21:31:10 +01:00
Chris Wilson
bed2701e1c Remove clip handling from generic surface layer.
Handling clip as part of the surface state, as opposed to being part of
the operation state, is cumbersome and a hindrance to providing true proxy
surface support. For example, the clip must be copied from the surface
onto the fallback image, but this was forgotten causing undue hassle in
each backend. Another example is the contortion the meta surface
endures to ensure the clip is correctly recorded. By contrast passing the
clip along with the operation is quite simple and enables us to write
generic handlers for providing surface wrappers. (And in the future, we
should be able to write more esoteric wrappers, e.g. automatic 2x FSAA,
trivially.)

In brief, instead of the surface automatically applying the clip before
calling the backend, the backend can call into a generic helper to apply
clipping. For raster surfaces, clip regions are handled automatically as
part of the composite interface. For vector surfaces, a clip helper is
introduced to replay and callback into an intersect_clip_path() function
as necessary.

Whilst this is not primarily a performance related change (the change
should just move the computation of the clip from the moment it is applied
by the user to the moment it is required by the backend), it is important
to track any potential regression:

ppc:
Speedups
========
image-rgba         evolution-20090607-0    1026085.22 0.18% -> 672972.07 0.77%:  1.52x speedup
▌
image-rgba         evolution-20090618-0    680579.98 0.12% -> 573237.66  0.16%:  1.19x speedup
▎
image-rgba      swfdec-fill-rate-4xaa-0    460296.92 0.36% -> 407464.63  0.42%:  1.13x speedup
▏
image-rgba      swfdec-fill-rate-2xaa-0    128431.95 0.47% -> 115051.86  0.42%:  1.12x speedup
▏
Slowdowns
=========
image-rgba     firefox-periodic-table-0    56837.61 0.78% -> 66055.17    3.20%:  1.09x slowdown
▏
2009-07-23 15:32:14 +01:00
Tobias Hunger
01eec61f4f [qt] Remove use of unnecessary QBrush pointer
QBrush is a implicitly shared datastructure. There is on need to layer
"explicit pointer based sharing" atop of it.

Mozilla Bug #498871
2009-07-16 00:16:59 -04:00
Tobias Hunger
222c12cc4e [qt] Remove use of unnecessary QPen pointer
QPen is a implicitly shared class, so there is no need to do explicit sharing
via pointers.

Mozilla Bug #498873
2009-07-16 00:16:59 -04:00
Tobias Hunger
0797b2fcaa [qt] Cleanup some whitespace
Mozilla bug #498843
2009-07-16 00:16:59 -04:00
Tobias Hunger
d782ba04b7 [qt] Add method to flush qpainter
This is required for non-X11 rendering backends.

Mozilla bug #498910
2009-07-16 00:16:58 -04:00
Tobias Hunger
e713857b85 [qt] Move _opstr() inside the #if 0 to avoid warnings
Mozilla bug #498917
2009-07-16 00:16:58 -04:00
Tobias Hunger
4f9551e5e5 [qt] Reduce padding in cairo_qt_surface_t struct
Removes 4 bytes of padding (on a 32bit system) from the datastructure by
reordering the members.

Mozilla bug #498880
2009-07-16 00:16:57 -04:00
Vladimir Vukicevic
22587f57bd Import Qt backend by Mozilla
Written by Vladimir Vukicevic to enable integration with Qt embedded
devices, this backend allows cairo code to target QPainter, and use
it as a source for other cairo backends.

This imports the sources from mozilla-central:
http://mxr.mozilla.org/mozilla-central/find?text=&kind=text&string=cairo-qpainter
renames them from cairo-qpainter to cairo-qt, and integrates the patch
by Oleg Romashin:
https://bugs.freedesktop.org/attachment.cgi?id=18953

And then attempts to restore 'make check' to full functionality.

However:
 - C++ does not play well with the PLT symbol hiding, and leaks into the
   global namespace. 'make check' fails at check-plt.sh

 - Qt embeds a GUI into QApplication which it requires to construct any
   QPainter drawable, i.e. used by the boilerplate to create a cairo-qt
   surface, and this leaks fonts (cairo-ft-fonts no less) causing assertion
   failures that all cairo objects are accounted for upon destruction.

[Updated by Chris Wilson]
Acked-by: Jeff Muizelaar <jeff@infidigm.net>
Acked-by: Carl Worth <cworth@cworth.org>
2009-06-16 11:03:46 +01:00