summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2023-01-01 15:14:08 +1030
committerAdrian Johnson <ajohnson@redneon.com>2023-01-15 19:29:28 +1030
commit7146358250975ec0f29b8ba80e80a26c52526bdc (patch)
treee37c45b2f6c4523aab202b331a4094949b189040 /test
parenta2b376ed787fc35270421730863411a0c047f564 (diff)
downloadcairo-7146358250975ec0f29b8ba80e80a26c52526bdc.tar.gz
Fix shared use of recording surface with paginated targets
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().
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions