[mutter] cogl: Remove the stub winsys
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] cogl: Remove the stub winsys
- Date: Fri, 25 Oct 2019 12:29:22 +0000 (UTC)
commit acc7b83322cc193964997982332d4fc668addefb
Author: Adam Jackson <ajax redhat com>
Date: Thu Oct 24 15:58:44 2019 -0400
cogl: Remove the stub winsys
It's not useful and supporting it leaks into the API in other weird
ways.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/885
clutter/clutter/clutter-stage.c | 11 --
cogl/cogl/cogl-context.c | 14 ---
cogl/cogl/cogl-renderer.c | 2 -
cogl/cogl/deprecated/cogl-clutter.c | 16 ---
cogl/cogl/deprecated/cogl-clutter.h | 4 -
cogl/cogl/meson.build | 2 -
cogl/cogl/winsys/cogl-winsys-stub-private.h | 37 ------
cogl/cogl/winsys/cogl-winsys-stub.c | 188 ----------------------------
8 files changed, 274 deletions(-)
---
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c
index bf260e1ca..f1f75bd0a 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -717,17 +717,6 @@ clutter_stage_allocate (ClutterActor *self,
flags | CLUTTER_DELEGATE_LAYOUT);
}
- /* XXX: Until Cogl becomes fully responsible for backend windows
- * Clutter need to manually keep it informed of the current window
- * size. We do this after the allocation above so that the stage
- * window has a chance to update the window size based on the
- * allocation.
- */
- _clutter_stage_window_get_geometry (priv->impl, &window_size);
-
- cogl_onscreen_clutter_backend_set_size (window_size.width,
- window_size.height);
-
/* reset the viewport if the allocation effectively changed */
clutter_actor_get_allocation_box (self, &alloc);
clutter_actor_box_get_size (&alloc, &new_width, &new_height);
diff --git a/cogl/cogl/cogl-context.c b/cogl/cogl/cogl-context.c
index 9a2dca2ba..464e2de0e 100644
--- a/cogl/cogl/cogl-context.c
+++ b/cogl/cogl/cogl-context.c
@@ -51,9 +51,6 @@
#include "driver/gl/cogl-pipeline-opengl-private.h"
#include "driver/gl/cogl-util-gl-private.h"
#include "winsys/cogl-winsys-private.h"
-#include "winsys/cogl-winsys-stub-private.h"
-
-#include "deprecated/cogl-framebuffer-deprecated.h"
#include <string.h>
#include <stdlib.h>
@@ -327,17 +324,6 @@ cogl_context_new (CoglDisplay *display,
context->window_buffer = NULL;
context->framebuffer_stack = _cogl_create_framebuffer_stack ();
- /* XXX: In this case the Clutter backend is still responsible for
- * the OpenGL binding API and for creating onscreen framebuffers and
- * so we have to add a dummy framebuffer to represent the backend
- * owned window... */
- if (_cogl_context_get_winsys (context) == _cogl_winsys_stub_get_vtable ())
- {
- CoglOnscreen *window = _cogl_onscreen_new ();
- cogl_set_framebuffer (COGL_FRAMEBUFFER (window));
- cogl_object_unref (COGL_FRAMEBUFFER (window));
- }
-
context->current_path = NULL;
context->stencil_pipeline = cogl_pipeline_new (context);
diff --git a/cogl/cogl/cogl-renderer.c b/cogl/cogl/cogl-renderer.c
index 62fda895d..6632f3bff 100644
--- a/cogl/cogl/cogl-renderer.c
+++ b/cogl/cogl/cogl-renderer.c
@@ -47,7 +47,6 @@
#include "cogl-gtype-private.h"
#include "winsys/cogl-winsys-private.h"
-#include "winsys/cogl-winsys-stub-private.h"
#ifdef COGL_HAS_EGL_PLATFORM_XLIB_SUPPORT
#include "winsys/cogl-winsys-egl-x11-private.h"
@@ -142,7 +141,6 @@ static CoglWinsysVtableGetter _cogl_winsys_vtable_getters[] =
#ifdef COGL_HAS_EGL_PLATFORM_XLIB_SUPPORT
_cogl_winsys_egl_xlib_get_vtable,
#endif
- _cogl_winsys_stub_get_vtable,
};
static void _cogl_renderer_free (CoglRenderer *renderer);
diff --git a/cogl/cogl/deprecated/cogl-clutter.c b/cogl/cogl/deprecated/cogl-clutter.c
index 3c0e63390..63899355e 100644
--- a/cogl/cogl/deprecated/cogl-clutter.c
+++ b/cogl/cogl/deprecated/cogl-clutter.c
@@ -44,7 +44,6 @@
#include "cogl-xlib-renderer.h"
#endif
#include "winsys/cogl-winsys-private.h"
-#include "winsys/cogl-winsys-stub-private.h"
#include "deprecated/cogl-clutter.h"
gboolean
@@ -77,18 +76,3 @@ cogl_clutter_winsys_has_feature (CoglWinsysFeature feature)
{
return _cogl_winsys_has_feature (feature);
}
-
-void
-cogl_onscreen_clutter_backend_set_size (int width, int height)
-{
- CoglFramebuffer *framebuffer;
-
- _COGL_GET_CONTEXT (ctx, NO_RETVAL);
-
- if (_cogl_context_get_winsys (ctx) != _cogl_winsys_stub_get_vtable ())
- return;
-
- framebuffer = COGL_FRAMEBUFFER (ctx->window_buffer);
-
- _cogl_framebuffer_winsys_update_size (framebuffer, width, height);
-}
diff --git a/cogl/cogl/deprecated/cogl-clutter.h b/cogl/cogl/deprecated/cogl-clutter.h
index 72d69c643..82f4cce82 100644
--- a/cogl/cogl/deprecated/cogl-clutter.h
+++ b/cogl/cogl/deprecated/cogl-clutter.h
@@ -45,10 +45,6 @@ COGL_DEPRECATED_FOR (cogl_has_feature)
gboolean
cogl_clutter_winsys_has_feature (CoglWinsysFeature feature);
-#define cogl_onscreen_clutter_backend_set_size cogl_onscreen_clutter_backend_set_size_CLUTTER
-void
-cogl_onscreen_clutter_backend_set_size (int width, int height);
-
G_END_DECLS
#endif /* __COGL_CLUTTER_H__ */
diff --git a/cogl/cogl/meson.build b/cogl/cogl/meson.build
index c66cfbc7d..95483168e 100644
--- a/cogl/cogl/meson.build
+++ b/cogl/cogl/meson.build
@@ -339,8 +339,6 @@ cogl_sources = [
'cogl-point-in-poly.c',
'cogl-list.c',
'cogl-list.h',
- 'winsys/cogl-winsys-stub-private.h',
- 'winsys/cogl-winsys-stub.c',
'cogl-config-private.h',
'cogl-config.c',
'cogl-boxed-value.h',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]