From dbe2acc2b1dcba44964f7fafcb242dd346de5f40 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 3 Mar 2010 18:17:15 +0000 Subject: [PATCH] docs: Update the HACKING.backends file The create_context() and ensure_context() sections should be more clear on the role of the functions, and their eventual caveats, like being called multiple times. --- doc/HACKING.backends | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/HACKING.backends b/doc/HACKING.backends index 12f96f2e1..c56e681b2 100644 --- a/doc/HACKING.backends +++ b/doc/HACKING.backends @@ -95,11 +95,18 @@ can be overridden: by Clutter. Clutter will call this function during the initialization phase. A GL (or GLES) context must always be available after the initialization, so that Cogl and Clutter can query it for capabilities. + This function might be called multiple times so if a context was + successfully created in a previous call, this function should + short-circuit early and return TRUE ClutterBackend::ensure_context -- This function is used to ensure that the backend drawing context is made current for passed ClutterStage, using the backend-specific - API. + API. This function is called each time a new stage is going to + be painted. If the Stage is inside its destruction sequence this + function should either fall back the drawing context to a default + drawing surface or should unset the drawing surface from the + drawing context. ClutterBackend::redraw -- This function is used to draw the passed ClutterStage; the backend