[waffle] [PATCH 5/7] nacl: add implementation for waffle_make_current
Chad Versace
chad.versace at intel.com
Mon Feb 2 15:29:04 PST 2015
On 01/22/2015 11:59 PM, Tapani Pälli wrote:
> Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
> ---
> src/waffle/nacl/nacl_container.cpp | 17 +++++++++++++++++
> src/waffle/nacl/nacl_container.h | 1 +
> src/waffle/nacl/nacl_platform.c | 2 +-
> 3 files changed, 19 insertions(+), 1 deletion(-)
>
> diff --git a/src/waffle/nacl/nacl_container.cpp b/src/waffle/nacl/nacl_container.cpp
> index bca39eb..abd64fd 100644
> --- a/src/waffle/nacl/nacl_container.cpp
> +++ b/src/waffle/nacl/nacl_container.cpp
> @@ -135,6 +135,16 @@ nacl_resize(struct nacl_container *nc, int32_t width, int32_t height)
> return true;
> }
>
> +static bool
> +nacl_makecurrent(waffle::nacl_container *nc)
> +{
> + if (!nc)
> + return false;
> +
> + nc->glSetCurrentContextPPAPI(nc->ctx.pp_resource());
> + return true;
> +}
> +
> }; // namespace waffle ends
>
> extern "C" struct nacl_container*
> @@ -163,3 +173,10 @@ nacl_resize(struct nacl_container *nc, int32_t width, int32_t height)
> reinterpret_cast<waffle::nacl_container*>(nc),
> width, height);
> }
> +
> +extern "C" bool
> +nacl_makecurrent(nacl_container *nc)
> +{
> + return waffle::nacl_makecurrent(
> + reinterpret_cast<waffle::nacl_container*>(nc));
> +}
I have the same comments as for patch 4. I think you can combine the
two definitions of nacl_makecurrent into one.
-------------- 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/8357ffe4/attachment.sig>
More information about the waffle
mailing list