Remove unused _cogl_swap_buffers_notify

Recently _cogl_swap_buffers_notify was added (in 142b229c5c) 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
1bdb0e6e98) but in the end it wasn't used.

Since it wasn't used in the end this patch removes the API.
This commit is contained in:
Robert Bragg 2011-02-22 17:13:56 +00:00
parent 47e93d4f7b
commit e381a159a7
10 changed files with 1 additions and 33 deletions

View File

@ -212,9 +212,6 @@ _cogl_framebuffer_flush_journal (CoglFramebuffer *framebuffer);
void void
_cogl_framebuffer_flush_dependency_journals (CoglFramebuffer *framebuffer); _cogl_framebuffer_flush_dependency_journals (CoglFramebuffer *framebuffer);
void
_cogl_framebuffer_swap_notify (CoglFramebuffer *framebuffer);
gboolean gboolean
_cogl_framebuffer_try_fast_read_pixel (CoglFramebuffer *framebuffer, _cogl_framebuffer_try_fast_read_pixel (CoglFramebuffer *framebuffer,
int x, int x,

View File

@ -457,11 +457,6 @@ _cogl_framebuffer_clear (CoglFramebuffer *framebuffer,
cogl_color_get_alpha_float (color)); cogl_color_get_alpha_float (color));
} }
void
_cogl_framebuffer_swap_notify (CoglFramebuffer *framebuffer)
{
}
int int
_cogl_framebuffer_get_width (CoglFramebuffer *framebuffer) _cogl_framebuffer_get_width (CoglFramebuffer *framebuffer)
{ {

View File

@ -1109,14 +1109,3 @@ _cogl_error_quark (void)
{ {
return g_quark_from_static_string ("cogl-error-quark"); 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 ());
}

View File

@ -1280,9 +1280,6 @@ _cogl_driver_error_quark (void);
void void
_cogl_onscreen_clutter_backend_set_size (int width, int height); _cogl_onscreen_clutter_backend_set_size (int width, int height);
void
_cogl_swap_buffers_notify (void);
CoglFramebuffer * CoglFramebuffer *
_cogl_get_draw_buffer (void); _cogl_get_draw_buffer (void);

View File

@ -413,7 +413,6 @@ clutter_stage_egl_redraw (ClutterStageWindow *stage_window)
CLUTTER_TIMER_START (_clutter_uprof_context, swapbuffers_timer); CLUTTER_TIMER_START (_clutter_uprof_context, swapbuffers_timer);
eglSwapBuffers (backend_egl->edpy, egl_surface); eglSwapBuffers (backend_egl->edpy, egl_surface);
CLUTTER_TIMER_STOP (_clutter_uprof_context, swapbuffers_timer); CLUTTER_TIMER_STOP (_clutter_uprof_context, swapbuffers_timer);
_cogl_swap_buffers_notify ();
} }
/* reset the redraw clipping for the next paint... */ /* reset the redraw clipping for the next paint... */

View File

@ -77,7 +77,6 @@ clutter_backend_egl_redraw (ClutterBackend *backend,
cogl_flush (); cogl_flush ();
eglWaitGL(); eglWaitGL();
eglSwapBuffers (backend_egl->edpy, stage_egl->egl_surface); eglSwapBuffers (backend_egl->edpy, stage_egl->egl_surface);
_cogl_swap_buffers_notify ();
} }
static ClutterActor * static ClutterActor *

View File

@ -648,8 +648,6 @@ clutter_stage_glx_redraw (ClutterStageWindow *stage_window)
CLUTTER_TIMER_START (_clutter_uprof_context, swapbuffers_timer); CLUTTER_TIMER_START (_clutter_uprof_context, swapbuffers_timer);
glXSwapBuffers (backend_x11->xdpy, drawable); glXSwapBuffers (backend_x11->xdpy, drawable);
CLUTTER_TIMER_STOP (_clutter_uprof_context, swapbuffers_timer); CLUTTER_TIMER_STOP (_clutter_uprof_context, swapbuffers_timer);
_cogl_swap_buffers_notify ();
} }
backend_glx->last_video_sync_count = video_sync_count; backend_glx->last_video_sync_count = video_sync_count;

View File

@ -159,7 +159,6 @@ clutter_stage_osx_get_wrapper (ClutterStageWindow *stage_window);
_clutter_stage_do_paint (CLUTTER_STAGE (self->stage_osx->wrapper), NULL); _clutter_stage_do_paint (CLUTTER_STAGE (self->stage_osx->wrapper), NULL);
cogl_flush (); cogl_flush ();
[[self openGLContext] flushBuffer]; [[self openGLContext] flushBuffer];
_cogl_swap_buffers_notify ();
} }
/* In order to receive key events */ /* In order to receive key events */

View File

@ -506,8 +506,6 @@ wayland_swap_buffers (ClutterStageWayland *stage_wayland)
wl_display_frame_callback (backend_wayland->wayland_display, wl_display_frame_callback (backend_wayland->wayland_display,
wayland_frame_callback, wayland_frame_callback,
stage_wayland); stage_wayland);
_cogl_swap_buffers_notify ();
} }
static void static void

View File

@ -528,10 +528,7 @@ clutter_stage_win32_redraw (ClutterStageWindow *stage_window)
cogl_flush (); cogl_flush ();
if (stage_win32->client_dc) if (stage_win32->client_dc)
{
SwapBuffers (stage_win32->client_dc); SwapBuffers (stage_win32->client_dc);
_cogl_swap_buffers_notify ();
}
} }
static void static void