[script] Call the context creation hook

Hook in the creation hook so applications can record or even modify the
contexts used in replay.
This commit is contained in:
Chris Wilson 2008-12-23 15:09:15 +00:00
parent 2c9323d394
commit 8abd21bd3a

View file

@ -956,6 +956,7 @@ _context (csi_t *ctx)
csi_status_t status;
cairo_surface_t *surface;
cairo_t *cr;
csi_context_create_func_t hook;
csi_proxy_t *proxy;
check (1);
@ -964,7 +965,11 @@ _context (csi_t *ctx)
if (_csi_unlikely (status))
return status;
cr = cairo_create (surface);
hook = ctx->hooks.context_create;
if (hook != NULL)
cr = hook (ctx->hooks.closure, surface);
else
cr = cairo_create (surface);
proxy = _csi_proxy_create (ctx, cr, NULL,
ctx->hooks.context_destroy,