| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The problem is _cairo_recording_surface_replay_and_create_regions()
stores the cairo_recording_region_type_t in the same structure as the
recording commands. This does not work well when the recording surface
is used as source by multiple surfaces
Fix this by moving the cairo_recording_region_type_t into a separate
struct cairo_recording_regions_array_t. This struct is stored in a
list that allows multiple create regions results to be store in the
surface.
The new function _cairo_recording_surface_region_array_attach() is
used to create a new cairo_recording_regions_array_t, attach it to the
recording surface and return a unique region id.
The _cairo_recording_surface_replay_and_create_regions() and
_cairo_recording_surface_replay_region() functions use this region id
to identify the cairo_recording_regions_array_t.
To handle nested recording surfaces, when replaying a recording, the
region id is passed to the target as an extra parameter in the surface
pattern. The wrapper surface makes a temporary copy of the pattern to
ensure the snapshot pattern in the recording surface is not modified.
cairo_recording_regions_array_t has a reference count so the target
can hold on to the cairo_recording_regions_array_t after the paginated
surface has called _cairo_recording_surface_region_array_remove().
|
| |
|
| |
|
|
|
|
|
| |
The gstate is not required and was causing some tag operations to be
ignored.
|
| |
|
| |
|
|
|
|
|
| |
Fixes record-neg-bounded-extents (image only) and
recording-ink-extents.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
We merge _cairo_surface_create_similar_scratch and
_cairo_surface_create_similar_solid into a single function named
_cairo_surface_create_scratch, to avoid confusion with
cairo_surface_create_similar which now will have a different
behaviour wrt the sizes and the device-scale.
_create_scratch assumes the width and height are in backend
coordinates, while create_similar does not.
|
|
|
|
|
|
|
|
|
|
| |
If we do this in surface it will be applied twice then
we chain to a different surface, like e.g. a subsurface.
We also remove a hack in cairo-surface-wrapper where it compensated
for the device scale not being applied.
v2: Compute the backend CTM in ensure_scaled_font().
|
|
|
|
|
| |
References: https://bugs.freedesktop.org/show_bug.cgi?id=48577
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
| |
And not the device_transform of the target. This smells fishy, but
appears to make the test suite happy.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
| |
Improves record*-text-transform.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
| |
Improves: record2x-select-font-face, record2x-text-transform
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
| |
Fixes paginated fallbacks.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
|
|
|
|
| |
If a bounded recording surface doesn't have its extents .x and .y at the
surface's origin, this code was translating all clips to make up for that.
However, the clip already is in device space.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41583
Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
| |
We need more than just mere translation!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
| |
Treat the target extents as an implicit clip for computing the maximal
operation extents.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Having spent the last dev cycle looking at how we could specialize the
compositors for various backends, we once again look for the
commonalities in order to reduce the duplication. In part this is
motivated by the idea that spans is a good interface for both the
existent GL backend and pixman, and so they deserve a dedicated
compositor. xcb/xlib target an identical rendering system and so they
should be using the same compositor, and it should be possible to run
that same compositor locally against pixman to generate reference tests.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
P.S. This brings massive upheaval (read breakage) I've tried delaying in
order to fix as many things as possible but now this one patch does far,
far, far too much. Apologies in advance for breaking your favourite
backend, but trust me in that the end result will be much better. :)
|
|
|
|
|
|
|
|
| |
Fixes push-group-offset which reduces to a replay of a recording surface
inside a recording surface and forgot to offset the clip imposed by the
extents of the first recording surface into device space.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
| |
Create the snapshot now, rather than a new lazy snapshot surface.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
| |
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
| |
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
|
|
| |
A stepping stone, the translation was accidentally dropped when
changing the clipping to be performed first.
Fixes twin.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
| |
Gah, I thought about this and noted that I need the inverse of the
normal transformation, yet failed to remember to actually use it.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
| |
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
| |
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
| |
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
| |
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
| |
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
| |
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
| |
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduced recently in a30a7402f73485dabdb6a016178247f9844017a1,
==32234== Conditional jump or move depends on uninitialised value(s)
==32234== at 0x6BCA326: _cairo_surface_wrapper_needs_device_transform (cairo-surface-wrapper.c:549)
==32234== by 0x6BCB47D: _cairo_surface_wrapper_set_inverse_transform (cairo-surface-wrapper.c:579)
==32234== by 0x6BCB55A: _cairo_surface_wrapper_init (cairo-surface-wrapper.c:621)
==32234== by 0x6BB87A6: _cairo_recording_surface_replay_internal (cairo-recording-surface.c:854)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
백현기 reported a use-case where he was recording an entire web-page
onto the recording surface, in order to facilitate panning. In this
scenario, where there may be lots of similar surfaces within the
recording we generate thousands of unused snapshot-images bloating
memory usage and impairing performance.
Under the right conditions we can replay directly onto the destination
which not only bypasses the snapshots but also skips the following
resampling.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
| |
Step 1, fix the failings sighted recently by tracking clip-boxes as an
explicit property of the clipping and of composition.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
|
|
| |
In order for custom context to automatically track when a pattern is
modify after being set on the context (and before it is used in an
operator), we need for there to be a callback when the pattern is
modified.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
| |
a2254e56 caused the fallback-resolution test to display empty fallback
images for to push_group/pop_group part of the test.
|
|
|
|
|
|
|
|
|
|
| |
Carefully handle subsurfaces of a recording surface through the analysis
and paginated surfaces so that we can generate a native pattern for the
vector backends, demonstrated by the PostScript backend.
Nothing remarkable, just a lot of bookkeeping to track the wrapped
surface types and to apply the correct offsets when generating the
subsurface pattern.
|
|
|
|
|
|
|
|
|
|
|
| |
I updated the Free Software Foundation address using the following script.
for i in $(git grep Temple | cut -d: -f1 )
do
sed -e 's/59 Temple Place[, -]* Suite 330, Boston, MA *02111-1307[, ]* USA/51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA/' -i "$i"
done
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=21356
|
|
|
|
|
|
|
|
|
|
|
|
| |
As _cairo_clip_init_rectangle() is equivalent and more importantly more
clearly written as:
_cairo_clip_init(&clip);
if (status = _cairo_clip_rectangle(&clip, &rect)) {
_cairo_clip_fini(&fini);
return status;
}
perform the transformation and in the process catch a few mistakes along
error paths.
|
|
|
|
|
| |
Fixes many failures of the paginated surfaces as they replayed through
the recording surfaces.
|
|
|
|
|
|
| |
As a simple step to ensure that we do not inadvertently modify (or at least
generate compiler warns if we try) user data, mark the incoming style
and matrices as constant.
|
|
|
|
|
| |
A pending commit will want to include some utility code from cairo and
so we need to extricate the error handling from the PLT symbol hiding.
|
|
|
|
|
|
| |
An older variant of the fixes for moving the device transformation out
of the surface layer, but languished in a side branch. The only benefit
of this patch is that it avoids the copy where possible.
|
| |
|
|
|
|
|
| |
Returning void using the pattern "return func_returning_void(...)"
is a gccism not supported by Sun Studio 12.
|
|
|
|
|
| |
We always need to make a local copy of the clip as the backends are free
to modify it as they process the operation.
|
|
|
|
|
|
|
| |
Add a new surface type that multiplies it input onto several output
surfaces. The only limitation is that it requires a master surface that is
used whenever we need to query surface options, such as font options and
extents.
|
|
|
|
| |
Use the snapshot of our target surface if available.
|
|
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
▏
|