st-drawing-area: Avoid unnecessary repaints

StDrawingArea uses the member variable needs_repaint to keep track
of whether it needs repainting. The variable is set to TRUE correctly,
e.g. on allocation or style changes - alas, it is never set to FALSE,
resulting in the area being repainted continuously.

https://bugzilla.gnome.org/show_bug.cgi?id=632197
This commit is contained in:
Florian Müllner 2010-10-15 09:18:37 +02:00
parent 700911ca5f
commit 42c736614c

View File

@ -115,6 +115,7 @@ st_drawing_area_paint (ClutterActor *self)
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height); surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
priv->context = cairo_create (surface); priv->context = cairo_create (surface);
priv->in_repaint = TRUE; priv->in_repaint = TRUE;
priv->needs_repaint = FALSE;
g_signal_emit ((GObject*)area, st_drawing_area_signals[REPAINT], 0); g_signal_emit ((GObject*)area, st_drawing_area_signals[REPAINT], 0);