• Chris Wilson's avatar
    Add cairo_device_t · f617d5fc
    Chris Wilson authored
    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
    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_finish() and
    along with a pair of routines for serialising interaction:
      cairo_device_acquire() and
    and a method to flush any outstanding accesses:
    The device for a particular surface may be retrieved using:
    The device returned is owned by the surface.
cairo-surface-snapshot.c 7.35 KB