[cairo-commit] src/cairo-paginated-surface.c src/cairo-surface-subsurface.c
Chris Wilson
ickle at kemper.freedesktop.org
Thu Jul 21 05:48:28 PDT 2011
src/cairo-paginated-surface.c | 2 +-
src/cairo-surface-subsurface.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 69cc802e61cd49871b84547131e59b99c9e48640
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu Jul 21 13:42:30 2011 +0100
Fix proxying of ->context_create()
Adrian Johnson found that I had broken show_page() and pinpointed the
cause to being that cairo_show_page() was being called on the recording
surface and not the pagination surface after my overhaul for
cairo_backend_t. In fact, the problem was far more severe as the mistake
caused the created context to point to the wrong surface entirely,
bypassing the surface proxy.
What is desired is for the proxy's target surface to choose what manner
of context is should use, but for all calls into the surface backend to
go through the proxy surface.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/cairo-paginated-surface.c b/src/cairo-paginated-surface.c
index e876127..1f05a8d 100644
--- a/src/cairo-paginated-surface.c
+++ b/src/cairo-paginated-surface.c
@@ -644,7 +644,7 @@ static cairo_t *
_cairo_paginated_context_create (void *target)
{
cairo_paginated_surface_t *surface = target;
- return cairo_create (surface->recording_surface);
+ return surface->recording_surface->backend->create_context (surface);
}
static const cairo_surface_backend_t cairo_paginated_surface_backend = {
diff --git a/src/cairo-surface-subsurface.c b/src/cairo-surface-subsurface.c
index 2a4a4fb..143c78e 100644
--- a/src/cairo-surface-subsurface.c
+++ b/src/cairo-surface-subsurface.c
@@ -421,7 +421,7 @@ static cairo_t *
_cairo_surface_subsurface_create_context(void *target)
{
cairo_surface_subsurface_t *surface = target;
- return cairo_create (surface->target);
+ return surface->target->backend->create_context (&surface->base);
}
static const cairo_surface_backend_t _cairo_surface_subsurface_backend = {
More information about the cairo-commit
mailing list