[waffle] [PATCH v2 3/4] waffle: initial empty implementation of nacl backend
Chad Versace
chad.versace at intel.com
Mon Dec 22 16:38:25 PST 2014
On 12/17/2014 04:17 AM, Tapani Pälli wrote:
> Patch adds nacl platform skeleton. Only thing it does is that
> it creates a container that holds the 3D context object which is
> responsible for any communication required with browser.
>
> v2: cleanups, remove unnecessary casts, use c99 initializer
> (Emil Velikov)
>
> Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
> ---
> CMakeLists.txt | 2 +-
> include/waffle/waffle.h | 1 +
> src/waffle/CMakeLists.txt | 16 ++++-
> src/waffle/api/waffle_init.c | 11 +++
> src/waffle/core/wcore_util.c | 1 +
> src/waffle/nacl/nacl_config.c | 63 +++++++++++++++++
> src/waffle/nacl/nacl_config.h | 49 ++++++++++++++
> src/waffle/nacl/nacl_container.cpp | 65 ++++++++++++++++++
> src/waffle/nacl/nacl_container.h | 40 +++++++++++
> src/waffle/nacl/nacl_context.c | 69 +++++++++++++++++++
> src/waffle/nacl/nacl_context.h | 52 ++++++++++++++
> src/waffle/nacl/nacl_display.c | 70 +++++++++++++++++++
> src/waffle/nacl/nacl_display.h | 52 ++++++++++++++
> src/waffle/nacl/nacl_platform.c | 134 +++++++++++++++++++++++++++++++++++++
> src/waffle/nacl/nacl_platform.h | 49 ++++++++++++++
> src/waffle/nacl/nacl_window.c | 90 +++++++++++++++++++++++++
> src/waffle/nacl/nacl_window.h | 59 ++++++++++++++++
> 17 files changed, 821 insertions(+), 2 deletions(-)
> create mode 100644 src/waffle/nacl/nacl_config.c
> create mode 100644 src/waffle/nacl/nacl_config.h
> create mode 100644 src/waffle/nacl/nacl_container.cpp
> create mode 100644 src/waffle/nacl/nacl_container.h
> create mode 100644 src/waffle/nacl/nacl_context.c
> create mode 100644 src/waffle/nacl/nacl_context.h
> create mode 100644 src/waffle/nacl/nacl_display.c
> create mode 100644 src/waffle/nacl/nacl_display.h
> create mode 100644 src/waffle/nacl/nacl_platform.c
> create mode 100644 src/waffle/nacl/nacl_platform.h
> create mode 100644 src/waffle/nacl/nacl_window.c
> create mode 100644 src/waffle/nacl/nacl_window.h
> diff --git a/src/waffle/nacl/nacl_container.h b/src/waffle/nacl/nacl_container.h
> new file mode 100644
> index 0000000..2a7ff8c
> --- /dev/null
> +++ b/src/waffle/nacl/nacl_container.h
> +#ifdef __cplusplus
> +
> +#include "ppapi/cpp/graphics_3d.h"
Is this include really needed in the header file? If you can
safely move it to the cpp file, please do that.
> diff --git a/src/waffle/nacl/nacl_context.c b/src/waffle/nacl/nacl_context.c
> new file mode 100644
> index 0000000..aabc301
> --- /dev/null
> +++ b/src/waffle/nacl/nacl_context.c
> +bool
> +nacl_context_destroy(struct wcore_context *wc_self)
> +{
> + struct nacl_context *self;
> + struct nacl_display *dpy;
> + struct nacl_platform *platform;
Of the three vars above, only 'self' is really used in this function.
Please remove the unused vars.
> diff --git a/src/waffle/nacl/nacl_display.c b/src/waffle/nacl/nacl_display.c
> new file mode 100644
> index 0000000..9599c6b
> --- /dev/null
> +++ b/src/waffle/nacl/nacl_display.c
> +bool
> +nacl_display_supports_context_api(struct wcore_display *wc_self,
> + int32_t context_api)
> +{
> + return NULL;
Should be `return false`.
Other than my comments, this patch looks good to me.
More information about the waffle
mailing list