On 02/12/2015 12:50 PM, Emil Velikov wrote:
On 9 February 2015 at 13:24, Tapani Pälli <[email protected]> wrote:
Patch fills attributes table suitable for Pepper API from
wcore_config_attrs passed by the application.

v2: throw error on unsupported context type (Chad Versace)
     code cleanup, comment for max attribs (Emil Velikov)

Signed-off-by: Tapani Pälli <[email protected]>
---
  src/waffle/nacl/nacl_config.c | 37 +++++++++++++++++++++++++++++++++++++
  src/waffle/nacl/nacl_config.h |  1 +
  2 files changed, 38 insertions(+)

diff --git a/src/waffle/nacl/nacl_config.c b/src/waffle/nacl/nacl_config.c
index 27a75e1..7478493 100644
--- a/src/waffle/nacl/nacl_config.c
+++ b/src/waffle/nacl/nacl_config.c
@@ -23,7 +23,9 @@
  // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 
USE
  // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+#include "ppapi/c/pp_graphics_3d.h"
  #include "nacl_config.h"
+#include "wcore_error.h"

  bool
  nacl_config_destroy(struct wcore_config *wc_self)
@@ -50,6 +52,41 @@ nacl_config_choose(struct wcore_platform *wc_plat,
      if (self == NULL)
          return NULL;

+    // Currently only OpenGL ES 2.0 is supported.
+    if (attrs->context_api != WAFFLE_CONTEXT_OPENGL_ES2) {
+        wcore_errorf(WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM,
+                     "NaCl does no support context type %s.",
+                     wcore_enum_to_string(attrs->context_api));
We're leaking self - free(self);

Feel free to have this as a follow up patch.

Will fix.

-Emil

_______________________________________________
waffle mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/waffle

Reply via email to