Commit graph

7297 commits

Author SHA1 Message Date
Chris Wilson
1ec1d6148e [perf] Compare performance against most recent tag. 2009-07-24 10:44:02 +01:00
Chris Wilson
9d7fd626c3 [script] Decompress font sources
Need to decompress patterns and embedded bytecode before passing to
fontconfig/FreeType.
2009-07-23 17:05:28 +01:00
Chris Wilson
5d8f366581 [test] clip representation is no longer surface dependent
So we can test the api just once in the preamble and not per-target.
2009-07-23 16:36:02 +01:00
Chris Wilson
c3f2db4f73 [drm] Add an accelerated image surface.
Use the DRM interface to h/w accelerate composition on image surfaces.
The purpose of the backend is simply to explore what such a hardware
interface might look like and what benefits we might expect.  The
use case that might justify writing such custom backends are embedded
devices running a drm compositor like wayland - which would, for example,
allow one to write applications that seamlessly integrated accelerated,
dynamic, high quality 2D graphics using Cairo with advanced interaction
(e.g. smooth animations in the UI) driven by a clutter framework...

In this first step we introduce the fundamental wrapping of GEM for intel
and radeon chipsets, and, for comparison, gallium. No acceleration, all
we do is use buffer objects (that is use the kernel memory manager) to
allocate images and simply use the fallback mechanism. This provides a
suitable base to start writing chip specific drivers.
2009-07-23 16:18:42 +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
Chris Wilson
f5a1cdf283 [gl] Simplify the common CLEAR of a surface
Almost every surface is at sometime cleared, so catch the operation in
paint(), and emit a simple glClear() instead.
2009-07-23 15:32:12 +01:00
Chris Wilson
eed17527f6 [gl] Do not use unchecked GL v1.5 features
The span renderer uses ARB_vertex_buffer_object which was included into
the core as part of OpenGL 1.5. We failed to check for the required version
during initialisation, and to my surprise the i915 can only support OpenGL
1.4 as it lacks ARB_occlusion_query. So just use the ARB extension instead
which is present on i915.
2009-07-23 15:32:12 +01:00
Chris Wilson
6c28c7a1e2 [perf] Add a simple report printer.
After a run, it can be useful to reprint the results, so add
cairo-perf-print to perform that task.

For the future, I'd like to move the performance suite over to the
git/perf style of single, multi-function binary.

The sequence of operations that I typically do are:

./cairo-perf-trace -r -v -i 6 > `git describe`.`hostname`.perf
./cairo-perf-diff-files REVA REVB
./cairo-perf-print REVA
./cairo-perf-compare-backends REVA

which misses the caching available with cairo-perf-diff. 'make html' is
almost what I want, but still too prescriptive. However, that does need to
be addressed for continuous performance monitoring.

Along the perf lines, those sequence of operations become:
  ./cairo-perf record -i 6
  ./cairo-perf report
  ./cairo-perf report REVA REVB
  ./cairo-perf report --backends="image,xlib,gl" REVA REVB
  ./cairo-perf report --html REVA REVB

Also we want to think about installing the cairo-perf binary. So we want
to differentiate when run inside a git checkout.
2009-07-23 15:32:12 +01:00
Chris Wilson
92ba74d760 [vg] Compile fixes for EGL boilerplate 2009-07-23 15:32:12 +01:00
Chris Wilson
bfbe875ded [gl] Enable GL backend for cairo-perf-trace 2009-07-22 07:52:30 +01:00
Chris Wilson
fed0006203 [NEWS] Add stub for OpenGL. 2009-07-22 07:49:05 +01:00
Chris Wilson
bff0b11634 [gl] Update reference images 2009-07-22 07:45:21 +01:00
Chris Wilson
653351cd2e [gl] Copy font options from image backend.
Enable hint metrics similar to the default image backend. However,
consider using the display stored in the GLX context to query the screen
default.
2009-07-22 07:38:24 +01:00
Chris Wilson
a2ac67274d [gl] Add warning about missing hook for XCloseDisplay(). 2009-07-22 00:05:07 +01:00
Chris Wilson
f2f42ec70a [gl] Apply pixel sample bias for spans 2009-07-22 00:01:22 +01:00
Chris Wilson
9e420f5d06 [gl] Another whitespace pass. 2009-07-21 23:46:40 +01:00
Chris Wilson
222fd8b49b Merge commit 'anholt/gl-span-renderer' 2009-07-21 23:42:34 +01:00
Chris Wilson
5471603b52 [gl] Use QUADS for drawing fill_rectangles() not TRIFAN
As each rectangle is independent, we need to draw the array using QUADS.
2009-07-21 23:38:05 +01:00
Chris Wilson
c3ef0c8d20 [gl] Whitespace
Ensure we leave a space between a function call and its parameters.
2009-07-21 23:31:30 +01:00
Chris Wilson
b71c27bf4e [gl] Remove dead code.
The loop between texture_setup() and clone_similar() should be
impossible, since every compositing backend should know how to clone an
image surface. cairo-gl is no longer an exception and so this code can
safely be removed.
2009-07-21 23:26:15 +01:00
Chris Wilson
c8cc6a205a [gl] Avoid temporary allocation of pixman trapezoids
When creating the trapezoid mask, avoid having to allocate a temporary
array to hold the converted pixman trapezoids by instead rasterizing each
trapezoid separately into the mask.
2009-07-21 23:08:39 +01:00
Chris Wilson
5deb8fa213 [gl] Construct a dummy window for the initial context
In order to make the initial context current we need a Drawable that
matches the context. In general, the RootWindow may not match the desired
context so we need to query the context and construct an appropriate
Drawable.
2009-07-21 22:54:21 +01:00
Chris Wilson
911482e5ae [gl] Constrain image sources to max texture size 2009-07-21 22:30:14 +01:00
Chris Wilson
1ae5942a3a Merge commit 'anholt/gl'
Conflicts:
	boilerplate/Makefile.sources
	boilerplate/cairo-boilerplate.c
	build/configure.ac.features
	src/cairo.h
	util/cairo-script/Makefile.am
2009-07-21 22:28:44 +01:00
Chris Wilson
fd9df4978d [perf] Don't override CAIRO_TRACE_DIR in cairo-perf-diff 2009-07-21 20:53:14 +01:00
Chris Wilson
2dd97ae59c [perf] Include trace comparison in html output 2009-07-20 22:20:01 +01:00
Chris Wilson
f30cee70f5 [perf] Search multiple directories for traces
In view of sharing traces between multiple builder, add some system wide
directories to the search path. This should be refined to a single
canonical location before release.
2009-07-20 22:20:01 +01:00
Chris Wilson
ebac096648 [build] And export CC_FOR_BUILD so that we can actually use it! 2009-07-20 19:54:40 +01:00
Chris Wilson
ed7853d499 [build] Use ${CC} as the default value for CC_FOR_BUILD 2009-07-20 19:38:34 +01:00
Chris Wilson
809f77a5cb [test] Summarise tests that fail during the preamble.
Some tests only run and check during the preamble phase, and those
failures were being ignored during the summary.
2009-07-20 18:56:10 +01:00
Chris Wilson
dbaa08e80b [test] Fallback to comparing the base image references
After looking at backend specific images, check against the base image
reference. This is useful to fallback surfaces like xlib-fallback, which
should look closer to the image backend than the xlib backend.
2009-07-20 18:56:10 +01:00
Chris Wilson
164e0d2ea3 [test] Misidentification of XFAIL as NEW
cut'n'paste error compared the image against the known failure instead of
any recorded new failure, when checking for NEW fails.
2009-07-20 18:56:10 +01:00
Chris Wilson
e288317748 Add a jhbuild moduleset. 2009-07-20 18:56:10 +01:00
Pierre Tardy
0c1e86d661 Cross-compilation fix for boilerplate/test 2009-07-20 18:56:09 +01:00
Chris Wilson
aac256b269 Compile fixes for mingw32.
Trivial typos found whilst using a cross-compiler.
2009-07-18 16:18:13 +01:00
Chris Wilson
922b01ad14 [test] Add a simplified CLEAR test.
Just performs a very basic masked clear. This does not exhibit the bug I was
looking for, but is still useful for its simplicity.
2009-07-17 14:27:19 +01:00
Chris Wilson
52fa8760ae Add OpenVG backend.
Based on the work by Øyvind Kolås and Pierre Tardy -- many thanks to
Pierre for pushing this backend for inclusion as well as testing and
reviewing my initial patch. And many more thanks to pippin for writing the
backend in the first place!

Hacked and chopped by myself into a suitable basis for a backend. Quite a
few issues remain open, but would seem to be ready for testing on suitable
hardware.
2009-07-17 11:50:02 +01:00
Chris Wilson
34d5b862bc [xlib] Enable Render support for the extended PDF operators
With the latest 0.11 release of renderproto we now have the ability to
use the extended PDF operators via Render.
2009-07-16 14:18:13 +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
Chris Wilson
1caa341039 Fix build under distcheck
Need to play a little dance to get the sources included and paths correct
whilst building source files with objdir != srcdir under distcheck.
2009-07-15 13:26:34 +01:00
Chris Wilson
818ad38a0e [boilerplate] Add make-...-constructors to .gitignore 2009-07-14 19:11:56 +01:00
Chris Wilson
9a65b4a116 [perf] Add cairo-traces to .gitignore 2009-07-14 19:11:56 +01:00
Chris Wilson
5796a9240e [test] Reconstruct REFERENCE_IMAGES
Rebuild the list from scratch using the contents of my git working tree.
2009-07-14 19:11:56 +01:00
Chris Wilson
8c55ca9ebc [directfb] Silence compiler warnings.
Add extended blend mode to operator switch.
2009-07-14 16:54:51 +01:00
Chris Wilson
8ad3fca210 [glitz] Extended blend mode support
Ensure that we fallback given an extended operator.
2009-07-14 16:51:31 +01:00