[clutter] Remove _clutter_shader_release_all()



commit 53d9e88135746350f3e329bbc9f5d478893f99c2
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Wed Oct 12 10:36:17 2011 +0100

    Remove _clutter_shader_release_all()
    
    This function is called when the backend is being disposed - as a way
    of releasing all ClutterShader. This doesn't take into account three
    things:
    
      - ClutterShader is deprecated
      - the Backend is *never* disposed
      - once the process terminates, all its resources are automatically
        released by the OS
    
    So the _clutter_shader_release_all() function is a pointless exercise
    in futility.

 clutter/deprecated/clutter-shader.c   |   14 --------------
 clutter/deprecated/clutter-shader.h   |    3 ---
 clutter/osx/clutter-backend-osx.c     |    2 --
 clutter/win32/clutter-backend-win32.c |    3 ---
 4 files changed, 0 insertions(+), 22 deletions(-)
---
diff --git a/clutter/deprecated/clutter-shader.c b/clutter/deprecated/clutter-shader.c
index cf3b20c..eb31a4a 100644
--- a/clutter/deprecated/clutter-shader.c
+++ b/clutter/deprecated/clutter-shader.c
@@ -819,20 +819,6 @@ clutter_shader_set_uniform (ClutterShader *shader,
     g_assert_not_reached ();
 }
 
-/*
- * _clutter_shader_release_all:
- *
- * Iterate through all #ClutterShaders and tell them to release GL context
- * related sources.
- */
-void
-_clutter_shader_release_all (void)
-{
-  g_list_foreach (clutter_shaders_list,
-                  (GFunc) clutter_shader_release,
-                  NULL);
-}
-
 /**
  * clutter_shader_get_fragment_source:
  * @shader: a #ClutterShader
diff --git a/clutter/deprecated/clutter-shader.h b/clutter/deprecated/clutter-shader.h
index 2604fe5..ee63662 100644
--- a/clutter/deprecated/clutter-shader.h
+++ b/clutter/deprecated/clutter-shader.h
@@ -139,9 +139,6 @@ CoglHandle            clutter_shader_get_cogl_program         (ClutterShader
 CoglHandle            clutter_shader_get_cogl_fragment_shader (ClutterShader      *shader);
 CoglHandle            clutter_shader_get_cogl_vertex_shader   (ClutterShader      *shader);
 
-/* private */
-void                  _clutter_shader_release_all        (void);
-
 #endif /* CLUTTER_DISABLE_DEPRECATED */
 
 G_END_DECLS
diff --git a/clutter/osx/clutter-backend-osx.c b/clutter/osx/clutter-backend-osx.c
index 9d93074..520f531 100644
--- a/clutter/osx/clutter-backend-osx.c
+++ b/clutter/osx/clutter-backend-osx.c
@@ -228,8 +228,6 @@ clutter_backend_osx_dispose (GObject *object)
 {
   ClutterBackendOSX *self = CLUTTER_BACKEND_OSX (object);
 
-  _clutter_shader_release_all ();
-
   [self->context release];
   self->context = NULL;
 
diff --git a/clutter/win32/clutter-backend-win32.c b/clutter/win32/clutter-backend-win32.c
index b16e10e..5ce3564 100644
--- a/clutter/win32/clutter-backend-win32.c
+++ b/clutter/win32/clutter-backend-win32.c
@@ -146,9 +146,6 @@ clutter_backend_win32_dispose (GObject *gobject)
   CLUTTER_NOTE (BACKEND, "Removing the event source");
   _clutter_backend_win32_events_uninit (CLUTTER_BACKEND (backend_win32));
 
-  /* Unrealize all shaders, since the GL context is going away */
-  _clutter_shader_release_all ();
-
   G_OBJECT_CLASS (clutter_backend_win32_parent_class)->dispose (gobject);
 
   if (backend->cogl_context)



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