From df0805fb0a0fccae1c58e596a0f59c6ac7b9954a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Tue, 24 May 2016 11:53:14 +0800 Subject: [PATCH] ClutterStageWindow: Remove dirty_back_buffer vfunc It was dead code, so lets remove it. https://bugzilla.gnome.org/show_bug.cgi?id=768976 --- clutter/clutter/clutter-stage-window.c | 12 ------------ clutter/clutter/clutter-stage-window.h | 4 ---- clutter/clutter/cogl/clutter-stage-cogl.c | 14 +------------- clutter/clutter/cogl/clutter-stage-cogl.h | 2 -- 4 files changed, 1 insertion(+), 31 deletions(-) diff --git a/clutter/clutter/clutter-stage-window.c b/clutter/clutter/clutter-stage-window.c index 197bf6cb2..4ef082a99 100644 --- a/clutter/clutter/clutter-stage-window.c +++ b/clutter/clutter/clutter-stage-window.c @@ -288,18 +288,6 @@ _clutter_stage_window_get_dirty_pixel (ClutterStageWindow *window, iface->get_dirty_pixel (window, x, y); } -void -_clutter_stage_window_dirty_back_buffer (ClutterStageWindow *window) -{ - ClutterStageWindowIface *iface; - - g_return_if_fail (CLUTTER_IS_STAGE_WINDOW (window)); - - iface = CLUTTER_STAGE_WINDOW_GET_IFACE (window); - if (iface->dirty_back_buffer) - iface->dirty_back_buffer (window); -} - /* NB: The presumption shouldn't be that a stage can't be comprised of * multiple internal framebuffers, so instead of simply naming this * function _clutter_stage_window_get_framebuffer(), the "active" diff --git a/clutter/clutter/clutter-stage-window.h b/clutter/clutter/clutter-stage-window.h index b12c4f386..25a68d60f 100644 --- a/clutter/clutter/clutter-stage-window.h +++ b/clutter/clutter/clutter-stage-window.h @@ -76,8 +76,6 @@ struct _ClutterStageWindowIface void (* redraw) (ClutterStageWindow *stage_window); - void (* dirty_back_buffer) (ClutterStageWindow *stage_window); - void (* get_dirty_pixel) (ClutterStageWindow *stage_window, int *x, int *y); @@ -133,8 +131,6 @@ void _clutter_stage_window_set_accept_focus (ClutterStageWin void _clutter_stage_window_redraw (ClutterStageWindow *window); -void _clutter_stage_window_dirty_back_buffer (ClutterStageWindow *window); - void _clutter_stage_window_get_dirty_pixel (ClutterStageWindow *window, int *x, int *y); diff --git a/clutter/clutter/cogl/clutter-stage-cogl.c b/clutter/clutter/cogl/clutter-stage-cogl.c index 37ce12791..ee9d6e9a6 100644 --- a/clutter/clutter/cogl/clutter-stage-cogl.c +++ b/clutter/clutter/cogl/clutter-stage-cogl.c @@ -403,7 +403,7 @@ clutter_stage_cogl_get_redraw_clip_bounds (ClutterStageWindow *stage_window, static inline gboolean valid_buffer_age (ClutterStageCogl *stage_cogl, int age) { - if (age <= 0 || stage_cogl->dirty_backbuffer) + if (age <= 0) return FALSE; return age < MIN (stage_cogl->damage_index, DAMAGE_HISTORY_MAX); @@ -643,9 +643,6 @@ clutter_stage_cogl_redraw (ClutterStageWindow *stage_window) /* reset the redraw clipping for the next paint... */ stage_cogl->initialized_redraw_clip = FALSE; - /* We have repaired the backbuffer */ - stage_cogl->dirty_backbuffer = FALSE; - stage_cogl->frame_count++; } @@ -657,14 +654,6 @@ clutter_stage_cogl_get_active_framebuffer (ClutterStageWindow *stage_window) return COGL_FRAMEBUFFER (stage_cogl->onscreen); } -static void -clutter_stage_cogl_dirty_back_buffer (ClutterStageWindow *stage_window) -{ - ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window); - - stage_cogl->dirty_backbuffer = TRUE; -} - static void clutter_stage_cogl_get_dirty_pixel (ClutterStageWindow *stage_window, int *x, @@ -707,7 +696,6 @@ clutter_stage_window_iface_init (ClutterStageWindowIface *iface) iface->get_redraw_clip_bounds = clutter_stage_cogl_get_redraw_clip_bounds; iface->redraw = clutter_stage_cogl_redraw; iface->get_active_framebuffer = clutter_stage_cogl_get_active_framebuffer; - iface->dirty_back_buffer = clutter_stage_cogl_dirty_back_buffer; iface->get_dirty_pixel = clutter_stage_cogl_get_dirty_pixel; } diff --git a/clutter/clutter/cogl/clutter-stage-cogl.h b/clutter/clutter/cogl/clutter-stage-cogl.h index 16c9de8a1..c8abdef4c 100644 --- a/clutter/clutter/cogl/clutter-stage-cogl.h +++ b/clutter/clutter/cogl/clutter-stage-cogl.h @@ -63,8 +63,6 @@ struct _ClutterStageCogl /* TRUE if the current paint cycle has a clipped redraw. In that case bounding_redraw_clip specifies the the bounds. */ guint using_clipped_redraw : 1; - - guint dirty_backbuffer : 1; }; struct _ClutterStageCoglClass