Commit graph

9677 commits

Author SHA1 Message Date
Chris Wilson
bca9400aec recording: break self-copy loop
This is the root cause of the issue why we never succeeded in
implementing deferred snapshot correctly; that is we decoupled the
source from the target in the upper layers before we make the coupling
inside the lowest level of recording surface. By deferring the copy, we
never saw the detach-snapshot in time.

Fortunately this was only an issue for backends that implemented strong
immutable source semantics! The oversight implies that we need to push
down a similar flush mechanism into all backends.

Fixes self-copy.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-14 12:37:57 +01:00
Chris Wilson
9f6428c517 recording: remove the duplicate 'content' field
Just use the member in the base class.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-14 12:37:56 +01:00
Chris Wilson
4a990925e9 script: Support unbounded native recording surfaces
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-14 12:37:56 +01:00
Chris Wilson
99fa5ff6c2 snapshot: Defer acquisition
Fixes 'xlib-expose-event' but triggers an infinite loop in self-copy.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-14 12:37:56 +01:00
Adrian Johnson
79aa04fd50 ps: use deflate compression for ps level 3 2011-08-14 19:19:34 +09:30
Chris Wilson
0f4cc1f118 script: Emit sequences of boxes to as 'rectangle' for clarity
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-13 20:54:24 +01:00
Chris Wilson
6b7539d96b test/xlib-expose-event: Be kinder to recording surfaces
And only create the source image once.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-13 20:54:24 +01:00
Chris Wilson
bc34c1c4ef Add missing 'cairo-image-surface-private.h'
It was supposed to be the centre point of e849e7c92, but I had a little
battle with git and lost...

Reported-by: James Cloos <cloos@jhcloos.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-13 20:54:24 +01:00
Chris Wilson
ba406866be stroke: Rely on the tessellator to remove self-intersections
As handling joins/caps between line segments shorter than
half_line_width is tricky.

Rather than also fixing the bug in traps, remove that code. The plan is
to avoiding hitting the traps code, short-circuiting several steps along
the fast rectangular paths.

Fixes line-width-overlap.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-13 16:41:28 +01:00
Chris Wilson
54c8e8ccfc test: Add a couple of variants to line-width-overlap
The bug may be in only the fast-path, but future bugs may lie elsewhere.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-13 16:21:08 +01:00
Chris Wilson
829eabfc95 test/line-width: Refactor and tidy
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-13 16:21:08 +01:00
Chris Wilson
279f6ceb59 Only reduce the clip if it is not in active use for the operation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-13 13:15:36 +01:00
Chris Wilson
d391f0908c pdf: composite-rectangles now require freeing after use
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-13 12:33:16 +01:00
Chris Wilson
afe84fa77f pdf: Compute fill-stroke extents first before trying to use it to set the clip
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-13 12:09:08 +01:00
Chris Wilson
487c5e4d3a recording: replay_all is meant to mean REPLAY && ALL!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-13 11:54:19 +01:00
Chris Wilson
73b87334a4 surface: Don't modify operator
Specifically don't transform SOURCE into a CLEAR as the paginated
backends may not be able to handle the new operator.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-13 11:50:27 +01:00
Chris Wilson
a37ed264ed pdf: Propagate NOTHING_TO_DO
It is taken care of by the higher layers.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-13 11:38:03 +01:00
Chris Wilson
dea24ef012 surface: propagate internal statuses
They are internal and used as such, but we still need to prevent them
from escaping into the public domain.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-13 11:34:31 +01:00
Chris Wilson
ed324fb3a1 recording-surface: Don't store the transient error when returning the path
As we report the status back to the caller who then decides whether to
take appropriate action.

"Fixes" user-font.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-13 11:22:31 +01:00
Chris Wilson
7a17e4362e boilerplate: improve fidelity of surface extraction
Create an image surface of equivalent content to the original.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-13 11:08:58 +01:00
Chris Wilson
9d5d46e846 bo-rect: One step too far...
Fixes a1-rasterisation-rectangles.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-13 11:08:58 +01:00
Chris Wilson
4862aadb0f surface-wrapper: Initialise clip to NULL
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-13 11:08:58 +01:00
Chris Wilson
6d1c0e6d28 Fix pollution from skia commit
I forgot to proof-read the patch before pushing and forgot I had left in
some damage from trying to get skia to link using libtool.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-13 10:06:08 +01:00
Chris Wilson
1ccd269a3f skia: Update to use cairo_backend_t interface
Still hopelessly broken. Requires compiling cairo to use static linking
and then still requires manual linkage to workaround libtool. Lots of
functionality is still absent - we need to either find analogues to some
Cairo operations or implement fallbacks - but it is sufficient to
investigate how Skia functions in direct comparison with Cairo for
tessellation/rasterisation.

Caveat emptor.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-13 09:58:02 +01:00
Chris Wilson
e849e7c929 image: move surface definition to new header for subclassing
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-13 09:54:28 +01:00
Chris Wilson
ee001b0b9f bo-rect: Micro-optimisation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-13 09:31:53 +01:00
Chris Wilson
2e545672ba perf/micro: diagonal lines
The ideal benchmark for spans?...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-13 09:30:26 +01:00
Chris Wilson
e9d41054f9 perf/micro: Test wide vs hairline strokes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-13 09:30:26 +01:00
Chris Wilson
ccbd7281b2 test/line-width: Add a non-antialiased variant
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-13 09:30:05 +01:00
Chris Wilson
be1ff2f45f xlib: Set the clip_region for glyphs
Broken (never set!) since the clipping overhaul. We could emulate the
xcb code to avoid setting it unnecessarily...

Fixes partial-clip-test.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-12 20:36:13 +01:00
Chris Wilson
e7fcbed63a bo: Perform an initial bucket sort on the start events
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-12 20:25:59 +01:00
Chris Wilson
64bcabfe4b tor: Micro-optimise
Inline sub-step edges and combine non-zero/even-odd paths by using a
winding_mask.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-12 20:25:59 +01:00
Chris Wilson
02da8c7efb default-context: Tidy push-group
Fix a couple of instances of the older style clipping code.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-12 20:25:59 +01:00
Chris Wilson
a3d2d5b42b script: Remove reference to image-surface-private
That header doesn't exist yet.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-12 20:25:59 +01:00
Chris Wilson
e7bd4c93e3 util/show-traps: Cache the rendering of the traps+edges
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-12 20:25:59 +01:00
Chris Wilson
b8e8c4cf9a util/show-polygon: Show end-points
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-12 18:43:06 +01:00
Chris Wilson
99c129dd13 test: Add record-extend
Exercise the extend modes with a clipped paint, because once upon a time
we had a bug...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-10 14:53:07 +01:00
Chris Wilson
deb88cca13 recording: do not reduce required clips
When painting with an unbound source, we would miss that the clip
extents were smaller than the mask extents and remove the solitary clip
(believing we were bound by a tight mask). For painting this is
obviously wrong, and due to a combination of bugs that set the mask to
the bound extents and then the failure to spot when that mask was larger
than the clip.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-10 14:06:16 +01:00
Chris Wilson
69c1ec9f13 script: Compile fix
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-10 14:06:16 +01:00
Chris Wilson
b13266ba0f script: Include an operator to replay a recording surface to a file
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-10 14:06:15 +01:00
Chris Wilson
40fa6c867c trace: Pop the surface after write-to-png
It is convenient if the user can simply enable the use of the commented
write-to-png operation just by removing the preceding '%'. However, to
do so we need to make sure that the line is stack-neutral and so need to
pop the surface that we place onto the stack after writing the png.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-10 14:06:15 +01:00
Chris Wilson
34ce4680d1 fixed: Allow the implicit close of the last fill path to complete a fill-box
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-10 10:23:51 +01:00
Chris Wilson
f8a3038008 tor: update is-vertical along with min-height
Similar to the minimum height property, is-vertical can only change
after an insertion or deletion event. So we only need to update the
flags after one of those events, so simply update it along side
min-height.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-10 10:23:27 +01:00
Chris Wilson
d22cf3dfbe perf: add curve
Time how long it takes to stroke and fill a single Bezier curve.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-09 20:20:18 +01:00
Chris Wilson
aa6df71228 perf: add many-curves
Continuing the theme of stressing the tessellators, draw lots of Bezier
curves!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-09 19:47:49 +01:00
Chris Wilson
2ef3a50a84 tor: Fix mergesort to handle doubly-linked list
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-09 19:02:43 +01:00
Chris Wilson
b823d4d28f tor: trivial changes
Some trivial cleanups that escaped my noticed during a tired review.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-09 19:02:36 +01:00
Chris Wilson
17e34b6eab bo-rectangular: Correctly mergesort a doubly-linked list
Saves having to fixup the pointers afterwards by only having to update
them on the list boundaries during merge.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-09 17:59:08 +01:00
Chris Wilson
a4e4e2bdd7 bo-rectangular: Use a mergesort to speedup insertion
However, this is only useful for inserting multiple boxes within the
pixel, so we maintain the cached insert cursor as this speeds up the
general case (and aides this optimisation as well).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-09 17:08:02 +01:00
Chris Wilson
014e5e5ec1 bo-rectangular: Eliminate allocation for pqueue
Since we only allocate a pointer to the rectangle after it is started
and so decoupled from the start queue, we reuse the memory allocated for
the start queue for the stop binary heap.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-09 16:06:50 +01:00