summaryrefslogtreecommitdiff
path: root/src/cairo-surface-private.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix user-font with foreground in group failures on image, PDF, and PSAdrian Johnson2023-01-031-0/+3
|
* Don't cull very thin lines on vector surfacesAdrian Johnson2015-10-171-0/+1
| | | | | | On vector surfaces, use a minimum line width when calculating extents. Bug 77298
* xlib: Implement SHM fallbacks and fast upload pathsChris Wilson2012-08-171-0/+3
| | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* image: silence make checkChris Wilson2012-05-311-0/+3
| | | | | | | The check for standalone headers requires that the cairo-image-surface-inline.h include the cairo-surface-private.h Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* image: Allow a snapshot to steal the original memory upon finishChris Wilson2012-04-271-0/+1
| | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* Split cairo-surface-private into struct+inlinesChris Wilson2012-04-191-9/+0
| | | | | References: https://bugs.freedesktop.org/show_bug.cgi?id=48577 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* win32: Rebase on the new compositor infrastructureChris Wilson2012-02-151-0/+10
| | | | | | | | | | Try and undo all the damage that has acrued over the years by plugging into the compositor pipeline. References: https://bugs.freedesktop.org/show_bug.cgi?id=42739 References: https://bugs.freedesktop.org/show_bug.cgi?id=42821 References: https://bugs.freedesktop.org/show_bug.cgi?id=33081 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* Add preliminary damage trackingChris Wilson2012-02-151-0/+1
| | | | | | | | This is initially based around the requirements for handling internal fallbacks to the image compositor and reducing the number of pixels required to be transferred. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* Replace the ad-hoc surface unwrappers with a function pointerChris Wilson2012-02-091-0/+4
| | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* spans: Propagate internal status when retrieving the clip surfaceChris Wilson2011-10-121-0/+3
| | | | | | | Including the information that there is nothing to do due to being all-clipped-out. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* Introduce a new compositor architectureChris Wilson2011-09-121-0/+1
| | | | | | | | | | | | | | | | | | 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. :)
* gstate: Update cached matrix state after device transform changes on the targetChris Wilson2010-06-111-0/+1
| | | | | | | | | | | | Commit 8d67186cb291cb877e52b987e2ac18c2a1175a57 caches whether the device transform is identity on context creation. However, the api is quite lax and allows the user to modify the device transform *after* he has started to use the surface in a context, as apparently WebKit does. Since this is not the only instance where we may need to invalidate caches if the user modifies state, introduce a simple mechanism for hooking into notifications of property changes. Fixes test/clip-device-offset.
* surface: Add _cairo_surface_release_device_reference() APIBenjamin Otte2010-05-181-0/+1
| | | | See the API documentation for that function about its intended purpose.
* ps: Enable native encoding of subsurface patterns.Chris Wilson2010-04-301-1/+3
| | | | | | | | | | 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.
* surface: Convert snapshots from an array to a double-linked list.Chris Wilson2010-04-301-2/+3
| | | | | Saves the memory allocation for the array, and the overhead of maintaining the area for both insertions and more importantly deletes.
* 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
* Add cairo_device_tChris Wilson2010-01-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The device is a generic method for accessing the underlying interface with the native graphics subsystem, typically the X connection or perhaps the GL context. By exposing a cairo_device_t on a surface and its various methods we enable finer control over interoperability with external interactions of the device by applications. The use case in mind is, for example, a multi-threaded gstreamer which needs to serialise its own direct access to the device along with Cairo's across many threads. Secondly, the cairo_device_t is a unifying API for the mismash of backend specific methods for controlling creation of surfaces with explicit devices and a convenient hook for debugging and introspection. The principal components of the API are the memory management of: cairo_device_reference(), cairo_device_finish() and cairo_device_destroy(); along with a pair of routines for serialising interaction: cairo_device_acquire() and cairo_device_release() and a method to flush any outstanding accesses: cairo_device_flush(). The device for a particular surface may be retrieved using: cairo_surface_get_device(). The device returned is owned by the surface.
* Make the surface->is_clear logic commonChris Wilson2009-10-211-2/+4
| | | | | | | A nasty surprise whilst profiling is that performing redundant clear operations is extremely painful. We can mitigate this somewhat by tracking the cleared state of surfaces and skipping repeated attempts to clear a surface.
* Remove clip handling from generic surface layer.Chris Wilson2009-07-231-18/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ▏
* Add a generic cow-snapshotting frameworkChris Wilson2009-06-021-1/+6
| | | | | | | | | | | | | Provide a mechanism for backends to attach and remove snapshots. This can be used by backends to provide a cache for _cairo_surface_clone_similar(), or by the meta-surfaces to only emit a single pattern for each unique snapshot. In order to prevent stale data being returned upon a snapshot operation, if the surface is modified (via the 5 high level operations, and on notification of external modification) we break the association with any current snapshot of the surface and thus preserve the current data for their use.
* [surface] Assign a unique id to the surface.Chris Wilson2009-06-011-0/+2
| | | | | Allocate an ever-increasing, non-zero, unique identifier to each surface. True for the first 4-billion...
* [surface] Separate the mime-data from the user-data.Chris Wilson2009-02-131-0/+1
| | | | | | | | | | | | | | | | | | Move the mime-data into its own array so that it cannot be confused with user-data and we do not need to hard-code the copy list during snapshotting. The copy-on-snapshotting code becomes far simpler and will accommodate all future mime-types. Keeping mime-data separate from user-data is important due to the principle of least surprise - the API is different and so it would be surprising if you queried for user-data and were returned an opaque mime-data pointer, and vice versa. (Note this should have been prevented by using interned strings, but conceptually it is cleaner to make the separation.) Also it aides in trimming the user data arrays which are linearly searched. Based on the original patch by Adrian Johnson: http://cgit.freedesktop.org/~ajohnson/cairo/commit/?h=metadata&id=37e607cc777523ad12a2d214708d79ecbca5b380
* [mime-data] Allow embedding of arbitrary mime-types.Chris Wilson2008-11-031-4/+0
| | | | | | | | | | Use the surface user-data array allow to store an arbitrary set of alternate image representations keyed by an interned string (which ensures that it has a unique key in the user-visible namespace). Update the API to mirror that of cairo_surface_set_user_data() [i.e. return a status indicator] and switch internal users of the mime-data to the public functions.
* Add cairo_surface_set_mime_data()Adrian Johnson2008-11-021-0/+4
| | | | Currently only handles jpeg data.
* [cairo-atomic] Rewrite reference counting using atomic ops.Chris Wilson2007-09-251-1/+2
| | | | | | Introduce an opaque cairo_reference_count_t and define operations on it in terms of atomic ops. Update all users of reference counters to use the new opaque type.
* Let surfaces specify their native resolution, for fallback purposesVladimir Vukicevic2007-09-181-0/+8
|
* Remove include of cairoint.h from *-private.h header files.Carl Worth2007-08-231-1/+1
| | | | | | | | | | | | These were recently added, (as part of sparse integration?), but they break boilerplate which reaches into at least cairo-types-private.h and cairo-scaled-font-private.h. But boilerplate cannot see cairoint.h or else it gets the internal sybol renaming, (with the INT_ prefix), and then all the test suite tests refuse to link. If this change reverts some recently-added functionality, (or cleanliness), then we'll just need to find some other way to add that back again without the breakage.
* [Makefile.am] Add target sparse to run sparse static source code analyzerBehdad Esfahbod2007-08-221-1/+1
| | | | There are still some bits not quite working.
* [cairo-surface] Move cairo_surface_t struct in cairo-surface-private.hBehdad Esfahbod2007-04-211-0/+96