[waffle] [PATCH 1/7] nacl: add supports_context_api implementation
Chad Versace
chad.versace at intel.com
Mon Feb 2 14:59:08 PST 2015
On 01/22/2015 11:59 PM, Tapani Pälli wrote:
> Currently only OpenGL ES 2.0 is supported.
>
> Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
> ---
> src/waffle/nacl/nacl_display.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/src/waffle/nacl/nacl_display.c b/src/waffle/nacl/nacl_display.c
> index 2d1162e..514d644 100644
> --- a/src/waffle/nacl/nacl_display.c
> +++ b/src/waffle/nacl/nacl_display.c
> @@ -66,5 +66,12 @@ bool
> nacl_display_supports_context_api(struct wcore_display *wc_self,
> int32_t context_api)
> {
> - return false;
> + switch (context_api) {
> + case WAFFLE_CONTEXT_OPENGL_ES2:
> + return true;
> + default:
> + wcore_error_internal("api %#x not supported by nacl platform.",
> + context_api);
> + return false;
> + }
> }
Almost. The return values are correct. But waffle_display_supports_context_api()
should emit an error only if an error happens or if user supplies erroneous
input. See cgl_display_supports_context_api() for a good example.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 884 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/waffle/attachments/20150202/4e6ffb70/attachment.sig>
More information about the waffle
mailing list