summaryrefslogtreecommitdiff
path: root/src/cairo-spans.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-01-18 21:53:42 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2010-01-22 23:01:50 +0000
commitf617d5fc982f749d0981c81c1de1be8dc3632717 (patch)
treecd188075e8decf98ce40fd1fdd5b59ca6f7935a1 /src/cairo-spans.c
parent82f8aa548d70acf51b319000d7a5c176fc73da64 (diff)
downloadcairo-f617d5fc982f749d0981c81c1de1be8dc3632717.tar.gz
Add cairo_device_t
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.
Diffstat (limited to 'src/cairo-spans.c')
-rw-r--r--src/cairo-spans.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cairo-spans.c b/src/cairo-spans.c
index af3b85ff4..7067a5eb6 100644
--- a/src/cairo-spans.c
+++ b/src/cairo-spans.c
@@ -266,6 +266,8 @@ _cairo_scan_converter_create_in_error (cairo_status_t status)
case CAIRO_STATUS_NO_MEMORY: RETURN_NIL;
case CAIRO_STATUS_INVALID_SIZE: RETURN_NIL;
case CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED: RETURN_NIL;
+ case CAIRO_STATUS_DEVICE_TYPE_MISMATCH: RETURN_NIL;
+ case CAIRO_STATUS_DEVICE_ERROR: RETURN_NIL;
default:
break;
}
@@ -372,6 +374,8 @@ _cairo_span_renderer_create_in_error (cairo_status_t status)
case CAIRO_STATUS_NO_MEMORY: RETURN_NIL;
case CAIRO_STATUS_INVALID_SIZE: RETURN_NIL;
case CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED: RETURN_NIL;
+ case CAIRO_STATUS_DEVICE_TYPE_MISMATCH: RETURN_NIL;
+ case CAIRO_STATUS_DEVICE_ERROR: RETURN_NIL;
default:
break;
}