summaryrefslogtreecommitdiff
path: root/src/cairo-pattern-private.h
Commit message (Collapse)AuthorAgeFilesLines
* Rename is_userfont_foreground to is_foreground_markerAdrian Johnson2023-01-271-1/+1
| | | | as it is used by FT as well as user fonts.
* Foreground color fixes for ft, svg, colrv1Adrian Johnson2023-01-271-0/+3
|
* Fix shared use of recording surface with paginated targetsAdrian Johnson2023-01-151-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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().
* Allow user fonts to use the foreground colorAdrian Johnson2021-09-181-0/+1
|
* Use uintptr_t for all casts between pointer and integerAdrian Johnson2021-07-251-5/+5
| | | | | | | | | | | | On 64-bit windows, long is 32-bit. When compiling there are a large number of warnings about mismatched sizes when casting long to/from a pointer. Use the (u)intptr_t type for any integer that will have a pointer stored in it. Use a (u)intptr_t cast when integers are stored in pointers to silence warnings. Fixes #263
* pattern: Mark a private routine as cairo_private.Bryce Harrington2017-12-071-1/+1
| | | | | | | | Fixes distcheck PLT error: Checking .libs/libcairo.so for local PLT entries 000000000031f1d0 0000024200000007 R_X86_64_JUMP_SLOT 0000000000055de0 _cairo_pattern_is_constant_alpha + 0
* pdf: set ca/CA instead of using an smask when the mask has constant alphaAdrian Johnson2017-10-241-0/+5
|
* pattern: don't round extents to 0 on vector surfacesAdrian Johnson2016-07-161-1/+2
| | | | | | | | In this bug a Type 3 font contains a dash glyph. The dash glyph consists of an 82x2 image. The image height, when scaled to user space, is < 1 resuling in the drawing operation for the image being culled. https://bugs.freedesktop.org/show_bug.cgi?id=94615
* image: Corrected extents calculationsBill Spitzak2014-10-101-1/+4
| | | | | | | | | | | | New implementations of _cairo_pattern_sampled_area and _cairo_pattern_get_extents which produce a more accurate bounding box. These do not depend on side-effects of analyze_filter, can handle different horizontal and vertical scales, filters wider than 1 for down-scaling, and compute a somewhat tighter bounding box in most cases. I removed the pad output of _cairo_pattern_analyze_filter as it is unused. Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
* gstate: Handle device scale on surface as sourceAlexander Larsson2013-09-051-0/+4
| | | | | | | | | | | | | | | | | | When creating a transformed pattern we must apply the device transform *before* the transform set on the pattern itself, otherwise e.g. its translation will not be affected by the device scale. We also fix up the device_transform related handling in _cairo_default_context_pop_group(). With a device scale we can no longer just use the device_transform_inverse to unset the device offset for the extents, so we make that a simple translate instead. We also remove some weird code that tries to handle the device transform but seems unnecessary (maybe a workaround for applying the device transform in the wrong order?). With that code removed things work fine, but with it things get translated wrongly when there is a scale.
* Remove an unimplemented function declarationUli Schlachter2012-09-241-3/+0
| | | | | | This was added in commit 2458120dee350cd1b49f999f64b17a895a4b6607. Signed-off-by: Uli Schlachter <psychon@znc.in>
* Split cairo-pattern-private into struct+inlinesChris Wilson2012-04-191-20/+0
| | | | | References: https://bugs.freedesktop.org/show_bug.cgi?id=48577 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* Replace the ad-hoc surface unwrappers with a function pointerChris Wilson2012-02-091-0/+8
| | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* Convert cairo_mime_surface_t to cairo_raster_source_pattern_tChris Wilson2011-11-251-1/+40
| | | | | | | | | | As discussed, overloading the cairo_surface_t semantics to include sources (i.e. read-only surfaces) was duplicating the definition of cairo_pattern_t. So rather than introduce a new surface type with pattern semantics, start along the thorny road of extensible pattern types. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* Introduce a new compositor architectureChris Wilson2011-09-121-41/+17
| | | | | | | | | | | | | | | | | | 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. :)
* check: make check-headers happyChris Wilson2011-08-151-0/+1
| | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* pattern: Do not provide type field in cairo_pattern_union_tAndrea Canciani2011-07-311-1/+0
| | | | | | The type field is accessible through the base.type field. This makes it possible to change the layout of cairo_pattern_t and move the type field without breaking cairo_pattern_union_t.
* Update FSF addressAndrea Canciani2011-07-311-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
* pattern: Add observer hooksChris Wilson2011-07-151-0/+362
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>