[mutter/gbsneto/clutter-cleanups: 7/10] clutter/main: Remove various deprecated thread functions
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gbsneto/clutter-cleanups: 7/10] clutter/main: Remove various deprecated thread functions
- Date: Mon, 1 Jul 2019 22:13:32 +0000 (UTC)
commit 7d9674149f757be9af75a13b0d796d410f0cbc16
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sun Jun 30 17:37:12 2019 -0300
clutter/main: Remove various deprecated thread functions
https://gitlab.gnome.org/GNOME/mutter/merge_requests/666
clutter/clutter/clutter-main.c | 108 -------------------------
clutter/clutter/clutter-main.h | 3 -
clutter/clutter/deprecated/clutter-main.h | 9 ---
clutter/tests/interactive/test-texture-async.c | 2 -
4 files changed, 122 deletions(-)
---
diff --git a/clutter/clutter/clutter-main.c b/clutter/clutter/clutter-main.c
index 6b691b059..0a09def72 100644
--- a/clutter/clutter/clutter-main.c
+++ b/clutter/clutter/clutter-main.c
@@ -682,69 +682,6 @@ clutter_main (void)
clutter_main_loop_level--;
}
-/**
- * clutter_threads_init:
- *
- * Initialises the Clutter threading mechanism, so that Clutter API can be
- * called by multiple threads, using clutter_threads_enter() and
- * clutter_threads_leave() to mark the critical sections.
- *
- * You must call g_thread_init() before this function.
- *
- * This function must be called before clutter_init().
- *
- * It is safe to call this function multiple times.
- *
- * Since: 0.4
- *
- * Deprecated: 1.10: This function does not do anything. Threading support
- * is initialized when Clutter is initialized.
- */
-void
-clutter_threads_init (void)
-{
-}
-
-/**
- * clutter_threads_set_lock_functions: (skip)
- * @enter_fn: function called when aquiring the Clutter main lock
- * @leave_fn: function called when releasing the Clutter main lock
- *
- * Allows the application to replace the standard method that
- * Clutter uses to protect its data structures. Normally, Clutter
- * creates a single #GMutex that is locked by clutter_threads_enter(),
- * and released by clutter_threads_leave(); using this function an
- * application provides, instead, a function @enter_fn that is
- * called by clutter_threads_enter() and a function @leave_fn that is
- * called by clutter_threads_leave().
- *
- * The functions must provide at least same locking functionality
- * as the default implementation, but can also do extra application
- * specific processing.
- *
- * As an example, consider an application that has its own recursive
- * lock that when held, holds the Clutter lock as well. When Clutter
- * unlocks the Clutter lock when entering a recursive main loop, the
- * application must temporarily release its lock as well.
- *
- * Most threaded Clutter apps won't need to use this method.
- *
- * This method must be called before clutter_init(), and cannot
- * be called multiple times.
- *
- * Since: 0.4
- */
-void
-clutter_threads_set_lock_functions (GCallback enter_fn,
- GCallback leave_fn)
-{
- g_return_if_fail (clutter_threads_lock == NULL &&
- clutter_threads_unlock == NULL);
-
- clutter_threads_lock = enter_fn;
- clutter_threads_unlock = leave_fn;
-}
-
gboolean
_clutter_threads_dispatch (gpointer data)
{
@@ -801,17 +738,11 @@ _clutter_threads_dispatch_free (gpointer data)
* SafeClosure *closure = data;
* gboolean res = FALSE;
*
- * // mark the critical section //
- *
- * clutter_threads_enter();
- *
* // the callback does not need to acquire the Clutter
* / lock itself, as it is held by the this proxy handler
* //
* res = closure->callback (closure->data);
*
- * clutter_threads_leave();
- *
* return res;
* }
* static gulong
@@ -1002,45 +933,6 @@ _clutter_threads_release_lock (void)
(* clutter_threads_unlock) ();
}
-/**
- * clutter_threads_enter:
- *
- * Locks the Clutter thread lock.
- *
- * Since: 0.4
- *
- * Deprecated: 1.12: This function should not be used by application
- * code; marking critical sections is not portable on various
- * platforms. Instead of acquiring the Clutter lock, schedule UI
- * updates from the main loop using clutter_threads_add_idle() or
- * clutter_threads_add_timeout().
- */
-void
-clutter_threads_enter (void)
-{
- _clutter_threads_acquire_lock ();
-}
-
-/**
- * clutter_threads_leave:
- *
- * Unlocks the Clutter thread lock.
- *
- * Since: 0.4
- *
- * Deprecated: 1.12: This function should not be used by application
- * code; marking critical sections is not portable on various
- * platforms. Instead of acquiring the Clutter lock, schedule UI
- * updates from the main loop using clutter_threads_add_idle() or
- * clutter_threads_add_timeout().
- */
-void
-clutter_threads_leave (void)
-{
- _clutter_threads_release_lock ();
-}
-
-
/**
* clutter_get_debug_enabled:
*
diff --git a/clutter/clutter/clutter-main.h b/clutter/clutter/clutter-main.h
index 6bacc5410..70e40f958 100644
--- a/clutter/clutter/clutter-main.h
+++ b/clutter/clutter/clutter-main.h
@@ -117,9 +117,6 @@ void clutter_disable_accessibility (void);
/* Threading functions */
CLUTTER_EXPORT
-void clutter_threads_set_lock_functions (GCallback enter_fn,
- GCallback leave_fn);
-CLUTTER_EXPORT
guint clutter_threads_add_idle (GSourceFunc func,
gpointer data);
CLUTTER_EXPORT
diff --git a/clutter/clutter/deprecated/clutter-main.h b/clutter/clutter/deprecated/clutter-main.h
index e30b1afb7..51ef9b792 100644
--- a/clutter/clutter/deprecated/clutter-main.h
+++ b/clutter/clutter/deprecated/clutter-main.h
@@ -31,15 +31,6 @@
G_BEGIN_DECLS
-CLUTTER_DEPRECATED
-void clutter_threads_init (void);
-
-CLUTTER_DEPRECATED
-void clutter_threads_enter (void);
-
-CLUTTER_DEPRECATED
-void clutter_threads_leave (void);
-
CLUTTER_DEPRECATED_FOR(clutter_device_manager_get_device)
ClutterInputDevice * clutter_get_input_device_for_id (gint id_);
diff --git a/clutter/tests/interactive/test-texture-async.c b/clutter/tests/interactive/test-texture-async.c
index 6ea5135d0..9a5574fac 100644
--- a/clutter/tests/interactive/test-texture-async.c
+++ b/clutter/tests/interactive/test-texture-async.c
@@ -146,9 +146,7 @@ test_texture_async_main (int argc, char *argv[])
task, path,
cleanup_task);
- clutter_threads_enter ();
clutter_main ();
- clutter_threads_leave ();
g_free (path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]