summaryrefslogtreecommitdiff
path: root/src/cairo-recording-surface-private.h
Commit message (Collapse)AuthorAgeFilesLines
* Make cairo_tag_begin/end work correctly in groupsAdrian Johnson2023-04-181-6/+18
| | | | Fixes #508
* Fix shared use of recording surface with paginated targetsAdrian Johnson2023-01-151-8/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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().
* Fix user-font with foreground in group failures on image, PDF, and PSAdrian Johnson2023-01-031-3/+4
|
* Allow user fonts to use the foreground colorAdrian Johnson2021-09-181-0/+5
|
* Remove all gstate from _cairo_surface_tagAdrian Johnson2021-07-181-4/+0
| | | | | The gstate is not required and was causing some tag operations to be ignored.
* Add tag functions to recording surface and surface-wrapperAdrian Johnson2016-10-011-0/+15
|
* pdf: fix record-replay-extend test failuresAdrian Johnson2016-06-051-1/+2
|
* Use surface_transform in replay_and_create_regionsGuillaume Ayoub2016-04-121-0/+1
| | | | | | | | | | | The surface_transform was already used surface_replay_with_clip, as the matrix is obviously needed for the clip. But now, because of the optimization done in commit 09b42c7, it's also needed by replay_and_create_regions: get_target_extents clips the target surface for performance issues, and therefore needs the surface_transform matrix to get the right clipping surface. Signed-off-by: Guillaume Ayoub <guillaume.ayoub@kozea.fr>
* pdf: avoid making groups a transparency group if not requiredAdrian Johnson2013-09-111-0/+8
| | | | | | | If the group contains only a combination of clear and opaque alpha and only OPERATOR_OVER is used in the group and to paint the group, a transparency group is not required. This allows the pdf viewer to replay the group in place.
* recording: Fix inconsistent usage of types for indicesChris Wilson2013-06-111-2/+2
| | | | | | | | We were wantonly mixing unsigned/signed integers for our index and counters, leading to compiler warnings. Be bold, and use unsigned consistently. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* Split cairo-recording-surface-private into struct+inlinesChris Wilson2012-04-191-26/+0
| | | | | References: https://bugs.freedesktop.org/show_bug.cgi?id=48577 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* Introduce a new compositor architectureChris Wilson2011-09-121-0/+6
| | | | | | | | | | | | | | | | | | 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. :)
* recording: optionally disable optimise away clearsChris Wilson2011-08-201-0/+1
| | | | | | | The observer wants to get an accurate recording of all operations, including clears. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* observer: record all operations and their timingsChris Wilson2011-08-201-0/+5
| | | | | | | | The immediate use of this is to print out the slowest operation of each type in a replayable manner. A continuing demonstration of how we may analyse traces... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* record: Offset the clip by the replay transformation as wellChris Wilson2011-08-141-2/+13
| | | | | | | | 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>
* recording: remove the duplicate 'content' fieldChris Wilson2011-08-141-2/+0
| | | | | | Just use the member in the base class. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* script: Support unbounded native recording surfacesChris Wilson2011-08-141-0/+12
| | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* record: Assume recording surface targets are clearChris Wilson2011-07-291-2/+0
| | | | | | | | The replay of the recording surface will not function correctly unless the target surface region is already clear. So assume that is and optimise away the initial clear. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* record: Use a bbtree to reduce is-visible checking overheadsChris Wilson2011-07-281-0/+11
| | | | | | | | | | By using a bounding-box rtree, we are able to reject invisible branches of the tree and so find the visible leafs with fewer intersection checks. Overhead reduction is strongly dependent upon the ability to spatially partition the geometry and so performance correlates with small tiles and small operations. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* record: Store the untransformed operation extents along with the commandChris Wilson2011-07-261-1/+2
| | | | | | | | | This allows us to actually clip out the geometry before we record it, as suggested by allowing the user to supply an extents... But it will be advantageous in later patches for reducing the amount of work we need to perform to replay. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* image: replay the recording surface directly onto the targetChris Wilson2011-07-231-0/+6
| | | | | | | | | | | | | | 백현기 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>
* clip: Rudimentary support for clip-polygon extractionChris Wilson2011-07-191-4/+1
| | | | | | | 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>
* pattern: Add observer hooksChris Wilson2011-07-151-0/+1
| | | | | | | | | 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>
* Remove unused function declarationsAndrea Canciani2011-03-191-5/+0
| | | | These functions have no implementation and are never called.
* recording: Avoid refcycles by always copying the command array.Chris Wilson2010-05-051-1/+0
| | | | | | | | | Short-term solution to avoid the refleaks and to make the test suite happy. A more elegant solution would be to track the references and avoid the substantial memory overhead of copying the recording surfaces. Thanks to Benjamin Otte for pointing out the solution to avoiding refcycles.
* ps: Enable native encoding of subsurface patterns.Chris Wilson2010-04-301-0/+1
| | | | | | | | | | 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.
* Update FSF addressAndrea Canciani2010-04-271-1/+1
| | | | | | | | | | | 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
* [meta] Rename cairo_meta_surface_t to cairo_recording_surface_t.M Joonas Pihlaja2009-10-221-0/+171
The new name is more descriptive than the rather opaque meta surface. Discussed with vigour on the mailing list and #cairo: http://lists.cairographics.org/archives/cairo/2009-July/017571.html