[Cogl] [PATCH] onscreen: Adds swap_buffers_with_damage api
Neil Roberts
neil at linux.intel.com
Mon Apr 29 09:46:44 PDT 2013
Robert Bragg <robert at sixbynine.org> writes:
> +#ifdef EGL_EXT_swap_buffers_with_damage
> +COGL_WINSYS_FEATURE_BEGIN (swap_buffers_with_damage,
> + "EXT\0",
> + "swap_buffers_with_damage\0",
> + 0)
[...]
> +#ifdef EGL_EXT_swap_buffers_with_damage
> + if (egl_renderer->pf_eglSwapBuffersWithDamage)
I don't think there's any need to #ifdef this code is there? The only
thing it uses from the extension is the function but that doesn't have
any custom types or enum values so it doesn't need anything from the
header.
> void
> + (*onscreen_swap_buffers_with_damage) (CoglOnscreen *onscreen,
> + const int *rectangles,
> + int n_rectangles);
Would it be worth removing the normal swap_buffers virtual and just
always use the _with_damage version internally? It seems a little bit
messy that the EGL winsys's have to implement both functions but they
actually do it with a single common implementation and then chain-up to
a different function depending on whether rectangles == NULL.
Regards,
- 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