summaryrefslogtreecommitdiff
path: root/cogl/cogl-renderer-private.h
diff options
context:
space:
mode:
authorRobert Bragg <robert@linux.intel.com>2013-04-18 14:19:43 +0100
committerRobert Bragg <robert@linux.intel.com>2013-04-30 16:39:31 +0100
commite3975d17117244b03f25404c6df0a562daab2011 (patch)
tree07b5db41c32049fbb10e42dc788688f3b6b498b6 /cogl/cogl-renderer-private.h
parent04a165580477042bd4c2a326ce94ae1558d86f5f (diff)
downloadcogl-e3975d17117244b03f25404c6df0a562daab2011.tar.gz
Add api for queuing idle callback internally
This adds a _cogl_poll_renderer_add_idle api that can be used internally for queuing an idle callback without needing to make any assumption about the system mainloop that is being used. This is now used to avoid having the _cogl_poll_renderer_dispatch() directly check for all kinds of events to dispatch, and to avoid having the winsys dispatch vfuncs need to directly know about CoglContext. This means we can now avoid having a back reference from CoglRenderer to the CoglContext. Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit a1e169f18f4257caec58760adccfe4ec09b9805d)
Diffstat (limited to 'cogl/cogl-renderer-private.h')
-rw-r--r--cogl/cogl-renderer-private.h16
1 files changed, 2 insertions, 14 deletions
diff --git a/cogl/cogl-renderer-private.h b/cogl/cogl-renderer-private.h
index b01a1c93..476c9550 100644
--- a/cogl/cogl-renderer-private.h
+++ b/cogl/cogl-renderer-private.h
@@ -31,6 +31,7 @@
#include "cogl-driver.h"
#include "cogl-texture-driver.h"
#include "cogl-context.h"
+#include "cogl-closure-list-private.h"
#ifdef COGL_HAS_XLIB_SUPPORT
#include <X11/Xlib.h>
@@ -54,20 +55,7 @@ struct _CoglRenderer
GArray *poll_fds;
int poll_fds_age;
- /* NB: Currently a CoglContext can only be associated with 1
- * CoglDisplay which itself can only be associated with 1
- * CoglRenderer.
- *
- * We currently do event dispatching from the renderer but once we
- * have fully setup a context then we need to refer to the context
- * to dispatch context events.
- *
- * This gives us a back-reference to the CoglContext that can be
- * referenced during event dispatching.
- *
- * We always need to consider that this may be NULL.
- */
- CoglContext *context;
+ CoglClosureList idle_closures;
GList *outputs;