[Cogl] [PATCH 1/3] Move event polling into CoglRenderer

Neil Roberts neil at linux.intel.com
Mon Apr 29 09:19:58 PDT 2013


Robert Bragg <robert at sixbynine.org> writes:

> + * <note>If your application didn't originally create a #CoglRenderer
> + * manually then you can easily get a #CoglRenderer pointer by calling
> + * cogl_get_renderer().</note>
> + *

This documentation for cogl_poll_dispatch says to call cogl_get_renderer
but it's actually called cogl_context_get_renderer. The former name does
seem more consistent though. Should we rename it and also
cogl_get_display? Maybe that could be a separate patch to rename both of
them seeing as cogl_context_get_display already exists.

> +void
> +_cogl_poll_renderer_add_fd (CoglRenderer *renderer,
> +                            int fd,
> +                            CoglPollFDEvent events)
> +{
> +  CoglPollFD pollfd = {
> +    .fd = fd,
> +    .events = events
> +  };

This is using C99 struct initialisers. It could be good to avoid this in
order not to break the MSVC build.

Otherwise looks good to me.

Reviewed-by: Neil Roberts <neil at linux.intel.com>

- Neil
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



More information about the Cogl mailing list