[mutter/wip/carlosg/drop-tesselator: 3/3] cogl: Remove CoglPath and the tesselator



commit 35b7a23d14d8a9353d383cdec12e75eb1356154b
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sat Mar 14 18:13:05 2020 +0100

    cogl: Remove CoglPath and the tesselator
    
    This was barely used, and doesn't represent the way we want to
    do 2D rendering.

 clutter/clutter/meson.build                |    1 -
 cogl/.gitignore                            |    2 -
 cogl/cogl-pango/meson.build                |    2 +-
 cogl/cogl-path/cogl-path-enum-types.c.in   |   48 -
 cogl/cogl-path/cogl-path-enum-types.h.in   |   25 -
 cogl/cogl-path/cogl-path-functions.h       |  486 ---------
 cogl/cogl-path/cogl-path-private.h         |  126 ---
 cogl/cogl-path/cogl-path-types.h           |   86 --
 cogl/cogl-path/cogl-path.c                 | 1561 ----------------------------
 cogl/cogl-path/cogl-path.h                 |   60 --
 cogl/cogl-path/cogl-path.symbols           |   59 --
 cogl/cogl-path/libmutter-cogl-path.map     |   17 -
 cogl/cogl-path/meson.build                 |   93 --
 cogl/cogl-path/mutter-cogl-path.pc.in      |   13 -
 cogl/cogl-path/tesselator/README           |  446 --------
 cogl/cogl-path/tesselator/dict-list.h      |  100 --
 cogl/cogl-path/tesselator/dict.c           |  111 --
 cogl/cogl-path/tesselator/dict.h           |  100 --
 cogl/cogl-path/tesselator/geom.c           |  264 -----
 cogl/cogl-path/tesselator/geom.h           |   84 --
 cogl/cogl-path/tesselator/gluos.h          |    1 -
 cogl/cogl-path/tesselator/memalloc.h       |   49 -
 cogl/cogl-path/tesselator/mesh.c           |  798 --------------
 cogl/cogl-path/tesselator/mesh.h           |  266 -----
 cogl/cogl-path/tesselator/normal.c         |  257 -----
 cogl/cogl-path/tesselator/normal.h         |   46 -
 cogl/cogl-path/tesselator/priorityq-heap.c |  256 -----
 cogl/cogl-path/tesselator/priorityq-heap.h |  107 --
 cogl/cogl-path/tesselator/priorityq-sort.h |  117 ---
 cogl/cogl-path/tesselator/priorityq.c      |  261 -----
 cogl/cogl-path/tesselator/priorityq.h      |  117 ---
 cogl/cogl-path/tesselator/render.c         |  502 ---------
 cogl/cogl-path/tesselator/render.h         |   53 -
 cogl/cogl-path/tesselator/sweep.c          | 1361 ------------------------
 cogl/cogl-path/tesselator/sweep.h          |   78 --
 cogl/cogl-path/tesselator/tess.c           |  632 -----------
 cogl/cogl-path/tesselator/tess.h           |  164 ---
 cogl/cogl-path/tesselator/tesselator.h     |  122 ---
 cogl/cogl-path/tesselator/tessmono.c       |  201 ----
 cogl/cogl-path/tesselator/tessmono.h       |   71 --
 cogl/cogl/cogl-context-private.h           |    2 -
 cogl/cogl/cogl-context.c                   |    4 -
 cogl/cogl/cogl-object.h                    |    6 +-
 cogl/cogl/cogl.h                           |   16 -
 cogl/meson.build                           |    1 -
 cogl/tests/conform/meson.build             |    3 -
 cogl/tests/conform/test-conform-main.c     |    2 -
 cogl/tests/conform/test-object.c           |   18 +-
 cogl/tests/conform/test-path-clip.c        |   68 --
 cogl/tests/conform/test-path.c             |  213 ----
 cogl/tests/unit/meson.build                |    1 -
 src/tests/clutter/conform/meson.build      |    1 -
 52 files changed, 13 insertions(+), 9465 deletions(-)
---
diff --git a/clutter/clutter/meson.build b/clutter/clutter/meson.build
index 4891b03d2..a13f637b2 100644
--- a/clutter/clutter/meson.build
+++ b/clutter/clutter/meson.build
@@ -429,7 +429,6 @@ libmutter_clutter = shared_library(libmutter_clutter_name,
   link_with: [
     libmutter_cogl,
     libmutter_cogl_pango,
-    libmutter_cogl_path,
   ],
   install_rpath: pkglibdir,
   install_dir: pkglibdir,
diff --git a/cogl/.gitignore b/cogl/.gitignore
index 7f7367087..cd9492d23 100644
--- a/cogl/.gitignore
+++ b/cogl/.gitignore
@@ -36,8 +36,6 @@ cogl-egl-defines.h
 cogl-enum-types.c
 cogl-enum-types.h
 cogl-gl-header.h
-cogl-path-enum-types.c
-cogl-path-enum-types.h
 cogl-config.h
 cogl-config.h.in
 cogl-mutter-config.h
diff --git a/cogl/cogl-pango/meson.build b/cogl/cogl-pango/meson.build
index 06fba5195..9390de357 100644
--- a/cogl/cogl-pango/meson.build
+++ b/cogl/cogl-pango/meson.build
@@ -30,7 +30,7 @@ libmutter_cogl_pango = shared_library('mutter-cogl-pango-' + libmutter_api_versi
   version: '0.0.0',
   soversion: 0,
   c_args: cogl_c_args,
-  include_directories: [cogl_includepath, cogl_path_includepath],
+  include_directories: [cogl_includepath],
   link_depends: libmutter_cogl_pango_map,
   link_args: libmutter_cogl_pango_link_args,
   dependencies: [cogl_pango_deps],
diff --git a/cogl/cogl/cogl-context-private.h b/cogl/cogl/cogl-context-private.h
index 605fd02df..ef168c190 100644
--- a/cogl/cogl/cogl-context-private.h
+++ b/cogl/cogl/cogl-context-private.h
@@ -52,7 +52,6 @@
 #include "cogl-onscreen-private.h"
 #include "cogl-fence-private.h"
 #include "cogl-poll-private.h"
-#include "cogl-path/cogl-path-types.h"
 #include "cogl-private.h"
 #include "winsys/cogl-winsys-private.h"
 
@@ -196,7 +195,6 @@ struct _CoglContext
   gboolean was_bound_to_onscreen;
 
   /* Primitives */
-  CoglPath         *current_path;
   CoglPipeline     *stencil_pipeline;
 
   /* Pre-generated VBOs containing indices to generate GL_TRIANGLES
diff --git a/cogl/cogl/cogl-context.c b/cogl/cogl/cogl-context.c
index 5d9ea07be..facb87b3a 100644
--- a/cogl/cogl/cogl-context.c
+++ b/cogl/cogl/cogl-context.c
@@ -308,7 +308,6 @@ cogl_context_new (CoglDisplay *display,
   for (i = 0; i < COGL_BUFFER_BIND_TARGET_COUNT; i++)
     context->current_buffer[i] = NULL;
 
-  context->current_path = NULL;
   context->stencil_pipeline = cogl_pipeline_new (context);
 
   context->quad_buffer_indices_byte = NULL;
@@ -356,9 +355,6 @@ _cogl_context_free (CoglContext *context)
 
   winsys->context_deinit (context);
 
-  if (context->current_path)
-    cogl_object_unref (context->current_path);
-
   if (context->default_gl_texture_2d_tex)
     cogl_object_unref (context->default_gl_texture_2d_tex);
 
diff --git a/cogl/cogl/cogl-object.h b/cogl/cogl/cogl-object.h
index d8e483745..aff1c9911 100644
--- a/cogl/cogl/cogl-object.h
+++ b/cogl/cogl/cogl-object.h
@@ -111,12 +111,12 @@ cogl_object_unref (void *object);
  * }
  *
  * static void
- * my_path_set_data (CoglPath *path, void *data)
+ * my_path_set_data (CoglPipeline *pipeline, void *data)
  * {
- *   cogl_object_set_user_data (COGL_OBJECT (path),
+ *   cogl_object_set_user_data (COGL_OBJECT (pipeline),
  *                              &private_key,
  *                              data,
- *                              destroy_path_private_cb);
+ *                              destroy_pipeline_private_cb);
  * }
  * ]|
  *
diff --git a/cogl/cogl/cogl.h b/cogl/cogl/cogl.h
index a71d09fbf..12789d38e 100644
--- a/cogl/cogl/cogl.h
+++ b/cogl/cogl/cogl.h
@@ -125,22 +125,6 @@
  * code has been migrated down into Cogl! */
 #include <cogl/deprecated/cogl-clutter.h>
 
-/*
- * Cogl Path api compatability
- *
- * The cogl_path_ api used to be part of the core Cogl api so for
- * compatability we include cogl-path.h via cogl.h
- *
- * Note: we have to make sure not to include cogl-path.h while
- * building core cogl or generating the Cogl .gir data because
- * cogl-path now gets built after cogl and some cogl-path headers are
- * only generated at build time...
- */
-#if !defined (COGL_COMPILATION) && \
-  !defined (COGL_GIR_SCANNING)
-#include <cogl-path/cogl-path.h>
-#endif
-
 /**
  * SECTION:cogl
  * @short_description: General purpose API
diff --git a/cogl/meson.build b/cogl/meson.build
index 2dfe5bcc6..e0ea1ed97 100644
--- a/cogl/meson.build
+++ b/cogl/meson.build
@@ -116,7 +116,6 @@ if have_cogl_tests
   subdir('test-fixtures')
 endif
 subdir('cogl')
-subdir('cogl-path')
 subdir('cogl-pango')
 if have_cogl_tests
   subdir('tests')
diff --git a/cogl/tests/conform/meson.build b/cogl/tests/conform/meson.build
index 3e1bc1596..eb4e4b599 100644
--- a/cogl/tests/conform/meson.build
+++ b/cogl/tests/conform/meson.build
@@ -40,8 +40,6 @@ cogl_test_conformance_sources = [
   'test-pipeline-shader-state.c',
   'test-texture-rg.c',
   'test-fence.c',
-  'test-path.c',
-  'test-path-clip.c',
 ]
 
 #unported = [
@@ -84,7 +82,6 @@ libmutter_cogl_test_conformance = executable('test-conformance',
   include_directories: cogl_test_conformance_includes,
   dependencies: [
     libmutter_cogl_dep,
-    libmutter_cogl_path_dep,
     libmutter_cogl_test_fixtures_dep,
   ],
   install: have_installed_tests,
diff --git a/cogl/tests/conform/test-conform-main.c b/cogl/tests/conform/test-conform-main.c
index a01026d43..73f72c846 100644
--- a/cogl/tests/conform/test-conform-main.c
+++ b/cogl/tests/conform/test-conform-main.c
@@ -57,8 +57,6 @@ main (int argc, char **argv)
   ADD_TEST (test_blend, 0, 0);
   ADD_TEST (test_premult, 0, TEST_KNOWN_FAILURE);
   UNPORTED_TEST (test_readpixels);
-  ADD_TEST (test_path, 0, 0);
-  ADD_TEST (test_path_clip, 0, 0);
   ADD_TEST (test_depth_test, 0, 0);
   ADD_TEST (test_backface_culling, 0, TEST_REQUIREMENT_NPOT);
   ADD_TEST (test_layer_remove, 0, 0);
diff --git a/cogl/tests/conform/test-object.c b/cogl/tests/conform/test-object.c
index 0a6dcab62..01e1788b8 100644
--- a/cogl/tests/conform/test-object.c
+++ b/cogl/tests/conform/test-object.c
@@ -42,39 +42,39 @@ void
 test_object (TestUtilsGTestFixture *fixture,
                   void *data)
 {
-  CoglPath *path;
+  CoglPipeline *pipeline;
 
   /* Assuming that COGL_OBJECT_N_PRE_ALLOCATED_USER_DATA_ENTRIES == 2
    * test associating 2 pointers to private data with an object */
-  cogl_path_new ();
-  path = cogl_get_path ();
+  cogl_pipeline_new ();
+  pipeline = cogl_pipeline_path ();
 
-  cogl_object_set_user_data (COGL_OBJECT (path),
+  cogl_object_set_user_data (COGL_OBJECT (pipeline),
                              &private_key0,
                              &user_data0,
                              destroy0_cb);
 
-  cogl_object_set_user_data (COGL_OBJECT (path),
+  cogl_object_set_user_data (COGL_OBJECT (pipeline),
                              &private_key1,
                              &user_data1,
                              destroy1_cb);
 
-  cogl_object_set_user_data (COGL_OBJECT (path),
+  cogl_object_set_user_data (COGL_OBJECT (pipeline),
                              &private_key2,
                              &user_data2,
                              destroy2_cb);
 
-  cogl_object_set_user_data (COGL_OBJECT (path),
+  cogl_object_set_user_data (COGL_OBJECT (pipeline),
                              &private_key1,
                              NULL,
                              destroy1_cb);
 
-  cogl_object_set_user_data (COGL_OBJECT (path),
+  cogl_object_set_user_data (COGL_OBJECT (pipeline),
                              &private_key1,
                              &user_data1,
                              destroy1_cb);
 
-  cogl_object_unref (path);
+  cogl_object_unref (pipeline);
 
   g_assert_cmpint (destroy0_count, ==, 1);
   g_assert_cmpint (destroy1_count, ==, 2);
diff --git a/cogl/tests/unit/meson.build b/cogl/tests/unit/meson.build
index 289245e29..a49f67453 100644
--- a/cogl/tests/unit/meson.build
+++ b/cogl/tests/unit/meson.build
@@ -17,7 +17,6 @@ libmutter_cogl_test_unit = executable('test-unit',
   include_directories: cogl_test_unit_includes,
   dependencies: [
     libmutter_cogl_dep,
-    libmutter_cogl_path_dep,
     libmutter_cogl_test_fixtures_dep,
   ],
   install: false,
diff --git a/src/tests/clutter/conform/meson.build b/src/tests/clutter/conform/meson.build
index d565934d4..aa535cf8e 100644
--- a/src/tests/clutter/conform/meson.build
+++ b/src/tests/clutter/conform/meson.build
@@ -65,7 +65,6 @@ foreach test : clutter_conform_tests
     dependencies: [
       clutter_deps,
       libmutter_clutter_dep,
-      libmutter_cogl_path_dep,
       libmutter_dep
     ],
     install: false,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]