From 7dfb9d04379aa8e0d323a64fce069ac4c39220c2 Mon Sep 17 00:00:00 2001 From: Toad King Date: Fri, 4 Jul 2014 15:02:02 -0400 Subject: [PATCH] Revert "(EMSCRIPTEN) add shared context support" This reverts commit 96feb074d085977345fe11363a1844136303ab68. --- Makefile.emscripten | 3 +-- gfx/context/emscriptenegl_ctx.c | 21 --------------------- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/Makefile.emscripten b/Makefile.emscripten index 82a4cab37a..a6d976ce5f 100644 --- a/Makefile.emscripten +++ b/Makefile.emscripten @@ -57,8 +57,7 @@ HAVE_SDL = 0 HAVE_ZLIB = 1 HAVE_FBO = 1 WANT_MINIZ = 1 -#MEMORY = 67108864 -MEMORY = 134217728 +MEMORY = 67108864 LTO = 0 # XXX: setting this to 1/2 currently crashes Firefox nightly PRECISE_F32 = 0 diff --git a/gfx/context/emscriptenegl_ctx.c b/gfx/context/emscriptenegl_ctx.c index 4b8d98e562..236c7986e8 100644 --- a/gfx/context/emscriptenegl_ctx.c +++ b/gfx/context/emscriptenegl_ctx.c @@ -32,14 +32,12 @@ #include #include -static EGLContext g_egl_hw_ctx; static EGLContext g_egl_ctx; static EGLSurface g_egl_surf; static EGLDisplay g_egl_dpy; static EGLConfig g_config; static bool g_inited; -static bool g_use_hw_ctx; static unsigned g_fb_width; static unsigned g_fb_height; @@ -155,16 +153,6 @@ static bool gfx_ctx_init(void *data) if (!g_egl_ctx) goto error; - if (g_use_hw_ctx) - { - g_egl_hw_ctx = eglCreateContext(g_egl_dpy, g_config, g_egl_ctx, - context_attributes); - RARCH_LOG("[VC/EGL]: Created shared context: %p.\n", (void*)g_egl_hw_ctx); - - if (g_egl_hw_ctx == EGL_NO_CONTEXT) - goto error; - } - // create an EGL window surface g_egl_surf = eglCreateWindowSurface(g_egl_dpy, g_config, 0, NULL); if (!g_egl_surf) @@ -283,14 +271,6 @@ static bool gfx_ctx_write_egl_image(void *data, const void *frame, unsigned widt return false; } -static void gfx_ctx_bind_hw_render(void *data, bool enable) -{ - (void)data; - g_use_hw_ctx = enable; - if (g_egl_dpy && g_egl_surf) - eglMakeCurrent(g_egl_dpy, g_egl_surf, g_egl_surf, enable ? g_egl_hw_ctx : g_egl_ctx); -} - const gfx_ctx_driver_t gfx_ctx_emscripten = { gfx_ctx_init, gfx_ctx_destroy, @@ -310,5 +290,4 @@ const gfx_ctx_driver_t gfx_ctx_emscripten = { gfx_ctx_write_egl_image, NULL, "emscripten", - gfx_ctx_bind_hw_render, };