[Glamor] [PATCH 29/34] glamor: Make sure we've put the context back to 0 periodically.
Alex Deucher
alexdeucher at gmail.com
Fri Feb 28 10:02:24 PST 2014
From: Eric Anholt <eric at anholt.net>
We've got some leaks in the tree.
Ported from Eric's xserver glamor tree.
Signed-off-by: Eric Anholt <eric at anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
src/glamor.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/glamor.c b/src/glamor.c
index 52e2f21..eb9c0ee 100644
--- a/src/glamor.c
+++ b/src/glamor.c
@@ -225,6 +225,8 @@ glamor_block_handler(ScreenPtr screen)
glamor_get_screen_private(screen);
glamor_gl_dispatch *dispatch;
+ assert(!glamor_priv->ctx.get_count);
+
dispatch = glamor_get_dispatch(glamor_priv);
glamor_priv->tick++;
dispatch->glFlush();
@@ -242,7 +244,11 @@ _glamor_block_handler(void *data, OSTimePtr timeout,
void *last_select_mask)
{
glamor_screen_private *glamor_priv = data;
- glamor_gl_dispatch *dispatch = glamor_get_dispatch(glamor_priv);
+ glamor_gl_dispatch *dispatch;
+
+ assert(!glamor_priv->ctx.get_count);
+
+ dispatch = glamor_get_dispatch(glamor_priv);
dispatch->glFlush();
glamor_put_dispatch(glamor_priv);
}
--
1.8.3.1
More information about the Glamor
mailing list