From 530861b24d3ff40aa1cfb6b133401a2ee8df98b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 18 May 2018 23:20:51 +0200 Subject: [PATCH] cogl: Remove left-over WebGL paths --- cogl/cogl/cogl-feature-private.c | 3 --- cogl/cogl/cogl-renderer.c | 2 -- cogl/cogl/cogl-renderer.h | 2 -- cogl/cogl/driver/gl/cogl-framebuffer-gl.c | 13 ------------- src/backends/x11/meta-renderer-x11.c | 1 - 5 files changed, 21 deletions(-) diff --git a/cogl/cogl/cogl-feature-private.c b/cogl/cogl/cogl-feature-private.c index a374aa534..b3664c726 100644 --- a/cogl/cogl/cogl-feature-private.c +++ b/cogl/cogl/cogl-feature-private.c @@ -64,9 +64,6 @@ _cogl_feature_check (CoglRenderer *renderer, break; case COGL_DRIVER_ANY: g_assert_not_reached (); - case COGL_DRIVER_WEBGL: - /* FIXME: WebGL should probably have its own COGL_EXT_IN_WEBGL flag */ - break; case COGL_DRIVER_NOP: case COGL_DRIVER_GL: case COGL_DRIVER_GL3: diff --git a/cogl/cogl/cogl-renderer.c b/cogl/cogl/cogl-renderer.c index f45c6586b..8783c891c 100644 --- a/cogl/cogl/cogl-renderer.c +++ b/cogl/cogl/cogl-renderer.c @@ -387,8 +387,6 @@ driver_id_to_name (CoglDriver id) return "gl3"; case COGL_DRIVER_GLES2: return "gles2"; - case COGL_DRIVER_WEBGL: - return "webgl"; case COGL_DRIVER_NOP: return "nop"; case COGL_DRIVER_ANY: diff --git a/cogl/cogl/cogl-renderer.h b/cogl/cogl/cogl-renderer.h index 7a7ba2e9f..ce72a97ed 100644 --- a/cogl/cogl/cogl-renderer.h +++ b/cogl/cogl/cogl-renderer.h @@ -333,7 +333,6 @@ cogl_renderer_remove_constraint (CoglRenderer *renderer, * @COGL_DRIVER_GL3: An OpenGL driver using the core GL 3.1 profile * @COGL_DRIVER_GLES1: An OpenGL ES 1.1 driver. * @COGL_DRIVER_GLES2: An OpenGL ES 2.0 driver. - * @COGL_DRIVER_WEBGL: A WebGL driver. * * Identifiers for underlying hardware drivers that may be used by * Cogl for rendering. @@ -348,7 +347,6 @@ typedef enum COGL_DRIVER_GL, COGL_DRIVER_GL3, COGL_DRIVER_GLES2, - COGL_DRIVER_WEBGL } CoglDriver; /** diff --git a/cogl/cogl/driver/gl/cogl-framebuffer-gl.c b/cogl/cogl/driver/gl/cogl-framebuffer-gl.c index aafbf2aa9..cb23408d7 100644 --- a/cogl/cogl/driver/gl/cogl-framebuffer-gl.c +++ b/cogl/cogl/driver/gl/cogl-framebuffer-gl.c @@ -535,9 +535,6 @@ try_creating_renderbuffers (CoglContext *ctx, /* WebGL adds a GL_DEPTH_STENCIL_ATTACHMENT and requires that we * use the GL_DEPTH_STENCIL format. */ -#ifdef HAVE_COGL_WEBGL - format = GL_DEPTH_STENCIL; -#else /* Although GL_OES_packed_depth_stencil is mostly equivalent to * GL_EXT_packed_depth_stencil, one notable difference is that * GL_OES_packed_depth_stencil doesn't allow GL_DEPTH_STENCIL to @@ -554,7 +551,6 @@ try_creating_renderbuffers (CoglContext *ctx, NULL); format = GL_DEPTH24_STENCIL8; } -#endif /* Create a renderbuffer for depth and stenciling */ GE (ctx, glGenRenderbuffers (1, &gl_depth_stencil_handle)); @@ -570,12 +566,6 @@ try_creating_renderbuffers (CoglContext *ctx, GE (ctx, glBindRenderbuffer (GL_RENDERBUFFER, 0)); -#ifdef HAVE_COGL_WEBGL - GE (ctx, glFramebufferRenderbuffer (GL_FRAMEBUFFER, - GL_DEPTH_STENCIL_ATTACHMENT, - GL_RENDERBUFFER, - gl_depth_stencil_handle)); -#else GE (ctx, glFramebufferRenderbuffer (GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, @@ -584,7 +574,6 @@ try_creating_renderbuffers (CoglContext *ctx, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, gl_depth_stencil_handle)); -#endif renderbuffers = g_list_prepend (renderbuffers, GUINT_TO_POINTER (gl_depth_stencil_handle)); @@ -872,12 +861,10 @@ _cogl_offscreen_gl_allocate (CoglOffscreen *offscreen, ( /* NB: WebGL introduces a DEPTH_STENCIL_ATTACHMENT and doesn't * need an extension to handle _FLAG_DEPTH_STENCIL */ -#ifndef HAVE_COGL_WEBGL (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_EXT_PACKED_DEPTH_STENCIL) || _cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_OES_PACKED_DEPTH_STENCIL)) && -#endif try_creating_fbo (ctx, offscreen->texture, offscreen->texture_level, diff --git a/src/backends/x11/meta-renderer-x11.c b/src/backends/x11/meta-renderer-x11.c index 07a64a56e..53d28e7b1 100644 --- a/src/backends/x11/meta-renderer-x11.c +++ b/src/backends/x11/meta-renderer-x11.c @@ -57,7 +57,6 @@ get_x11_cogl_winsys_vtable (CoglRenderer *renderer) return _cogl_winsys_glx_get_vtable (); case COGL_DRIVER_ANY: case COGL_DRIVER_NOP: - case COGL_DRIVER_WEBGL: break; } g_assert_not_reached ();