[clutter/wip/cogl-winsys-glx: 6/20] Remove unused _cogl_swap_buffers_notify



commit e381a159a7b978ec61fc9e3d3e555e651dab42bb
Author: Robert Bragg <robert linux intel com>
Date:   Tue Feb 22 17:13:56 2011 +0000

    Remove unused _cogl_swap_buffers_notify
    
    Recently _cogl_swap_buffers_notify was added (in 142b229c5c26) so that
    Cogl would be notified when Clutter performs a swap buffers request for
    a given onscreen framebuffer. It was expected this would be required for
    the recent cogl_read_pixel optimization that was implemented (ref
    1bdb0e6e98db) but in the end it wasn't used.
    
    Since it wasn't used in the end this patch removes the API.

 clutter/cogl/cogl/cogl-framebuffer-private.h |    3 ---
 clutter/cogl/cogl/cogl-framebuffer.c         |    5 -----
 clutter/cogl/cogl/cogl.c                     |   11 -----------
 clutter/cogl/cogl/cogl.h                     |    3 ---
 clutter/egl/clutter-stage-egl.c              |    1 -
 clutter/fruity/clutter-backend-fruity.c      |    1 -
 clutter/glx/clutter-stage-glx.c              |    2 --
 clutter/osx/clutter-stage-osx.c              |    1 -
 clutter/wayland/clutter-stage-wayland.c      |    2 --
 clutter/win32/clutter-stage-win32.c          |    5 +----
 10 files changed, 1 insertions(+), 33 deletions(-)
---
diff --git a/clutter/cogl/cogl/cogl-framebuffer-private.h b/clutter/cogl/cogl/cogl-framebuffer-private.h
index 14a4d04..b1a99a8 100644
--- a/clutter/cogl/cogl/cogl-framebuffer-private.h
+++ b/clutter/cogl/cogl/cogl-framebuffer-private.h
@@ -212,9 +212,6 @@ _cogl_framebuffer_flush_journal (CoglFramebuffer *framebuffer);
 void
 _cogl_framebuffer_flush_dependency_journals (CoglFramebuffer *framebuffer);
 
-void
-_cogl_framebuffer_swap_notify (CoglFramebuffer *framebuffer);
-
 gboolean
 _cogl_framebuffer_try_fast_read_pixel (CoglFramebuffer *framebuffer,
                                        int x,
diff --git a/clutter/cogl/cogl/cogl-framebuffer.c b/clutter/cogl/cogl/cogl-framebuffer.c
index 28b95ab..50a7d07 100644
--- a/clutter/cogl/cogl/cogl-framebuffer.c
+++ b/clutter/cogl/cogl/cogl-framebuffer.c
@@ -457,11 +457,6 @@ _cogl_framebuffer_clear (CoglFramebuffer *framebuffer,
                              cogl_color_get_alpha_float (color));
 }
 
-void
-_cogl_framebuffer_swap_notify (CoglFramebuffer *framebuffer)
-{
-}
-
 int
 _cogl_framebuffer_get_width (CoglFramebuffer *framebuffer)
 {
diff --git a/clutter/cogl/cogl/cogl.c b/clutter/cogl/cogl/cogl.c
index 62636d6..4ee9318 100644
--- a/clutter/cogl/cogl/cogl.c
+++ b/clutter/cogl/cogl/cogl.c
@@ -1109,14 +1109,3 @@ _cogl_error_quark (void)
 {
   return g_quark_from_static_string ("cogl-error-quark");
 }
-
-/* Until Cogl becomes responsible for handling swap-buffer requests
- * this API is used by Clutter to notify us when it issues a
- * swap-buffer on our behalf. */
-void
-_cogl_swap_buffers_notify (void)
-{
-  _COGL_GET_CONTEXT (ctx, NO_RETVAL);
-
-  _cogl_framebuffer_swap_notify (_cogl_get_draw_buffer ());
-}
diff --git a/clutter/cogl/cogl/cogl.h b/clutter/cogl/cogl/cogl.h
index 6eed72c..11ee5c4 100644
--- a/clutter/cogl/cogl/cogl.h
+++ b/clutter/cogl/cogl/cogl.h
@@ -1280,9 +1280,6 @@ _cogl_driver_error_quark (void);
 void
 _cogl_onscreen_clutter_backend_set_size (int width, int height);
 
-void
-_cogl_swap_buffers_notify (void);
-
 CoglFramebuffer *
 _cogl_get_draw_buffer (void);
 
diff --git a/clutter/egl/clutter-stage-egl.c b/clutter/egl/clutter-stage-egl.c
index 8642df4..276c479 100644
--- a/clutter/egl/clutter-stage-egl.c
+++ b/clutter/egl/clutter-stage-egl.c
@@ -413,7 +413,6 @@ clutter_stage_egl_redraw (ClutterStageWindow *stage_window)
       CLUTTER_TIMER_START (_clutter_uprof_context, swapbuffers_timer);
       eglSwapBuffers (backend_egl->edpy, egl_surface);
       CLUTTER_TIMER_STOP (_clutter_uprof_context, swapbuffers_timer);
-      _cogl_swap_buffers_notify ();
     }
 
   /* reset the redraw clipping for the next paint... */
diff --git a/clutter/fruity/clutter-backend-fruity.c b/clutter/fruity/clutter-backend-fruity.c
index 054c34b..df1c1e8 100644
--- a/clutter/fruity/clutter-backend-fruity.c
+++ b/clutter/fruity/clutter-backend-fruity.c
@@ -77,7 +77,6 @@ clutter_backend_egl_redraw (ClutterBackend *backend,
   cogl_flush ();
   eglWaitGL();
   eglSwapBuffers (backend_egl->edpy,  stage_egl->egl_surface);
-  _cogl_swap_buffers_notify ();
 }
 
 static ClutterActor *
diff --git a/clutter/glx/clutter-stage-glx.c b/clutter/glx/clutter-stage-glx.c
index 54e2024..6e20369 100644
--- a/clutter/glx/clutter-stage-glx.c
+++ b/clutter/glx/clutter-stage-glx.c
@@ -648,8 +648,6 @@ clutter_stage_glx_redraw (ClutterStageWindow *stage_window)
       CLUTTER_TIMER_START (_clutter_uprof_context, swapbuffers_timer);
       glXSwapBuffers (backend_x11->xdpy, drawable);
       CLUTTER_TIMER_STOP (_clutter_uprof_context, swapbuffers_timer);
-
-      _cogl_swap_buffers_notify ();
     }
 
   backend_glx->last_video_sync_count = video_sync_count;
diff --git a/clutter/osx/clutter-stage-osx.c b/clutter/osx/clutter-stage-osx.c
index 8576f6b..26b6091 100644
--- a/clutter/osx/clutter-stage-osx.c
+++ b/clutter/osx/clutter-stage-osx.c
@@ -159,7 +159,6 @@ clutter_stage_osx_get_wrapper (ClutterStageWindow *stage_window);
   _clutter_stage_do_paint (CLUTTER_STAGE (self->stage_osx->wrapper), NULL);
   cogl_flush ();
   [[self openGLContext] flushBuffer];
-  _cogl_swap_buffers_notify ();
 }
 
 /* In order to receive key events */
diff --git a/clutter/wayland/clutter-stage-wayland.c b/clutter/wayland/clutter-stage-wayland.c
index d010474..c691dde 100644
--- a/clutter/wayland/clutter-stage-wayland.c
+++ b/clutter/wayland/clutter-stage-wayland.c
@@ -506,8 +506,6 @@ wayland_swap_buffers (ClutterStageWayland *stage_wayland)
   wl_display_frame_callback (backend_wayland->wayland_display,
 			     wayland_frame_callback,
 			     stage_wayland);
-
-  _cogl_swap_buffers_notify ();
 }
 
 static void
diff --git a/clutter/win32/clutter-stage-win32.c b/clutter/win32/clutter-stage-win32.c
index 540c68a..8eb3567 100644
--- a/clutter/win32/clutter-stage-win32.c
+++ b/clutter/win32/clutter-stage-win32.c
@@ -528,10 +528,7 @@ clutter_stage_win32_redraw (ClutterStageWindow *stage_window)
   cogl_flush ();
 
   if (stage_win32->client_dc)
-    {
-      SwapBuffers (stage_win32->client_dc);
-      _cogl_swap_buffers_notify ();
-    }
+    SwapBuffers (stage_win32->client_dc);
 }
 
 static void



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