mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 12:16:30 +01:00
_single_exposure is now a member variable for each GtkCanvas.
Gtk coalesces multiple exposes into a single combined rect. If _single_exposure is disabled, we break apart the individual expose rects for the canvas rendering.
This commit is contained in:
parent
16346296d3
commit
b8ec035b24
2 changed files with 18 additions and 15 deletions
|
|
@ -382,6 +382,7 @@ GtkCanvas::GtkCanvas ()
|
|||
, _new_current_item (0)
|
||||
, _grabbed_item (0)
|
||||
, _focused_item (0)
|
||||
, _single_exposure (1)
|
||||
, current_tooltip_item (0)
|
||||
, tooltip_window (0)
|
||||
{
|
||||
|
|
@ -786,11 +787,11 @@ GtkCanvas::on_expose_event (GdkEventExpose* ev)
|
|||
draw_context->fill ();
|
||||
|
||||
/* render canvas */
|
||||
if ( _single_exposure ) {
|
||||
|
||||
#define CANVAS_SINGLE_EXPOSE
|
||||
#ifdef CANVAS_SINGLE_EXPOSE
|
||||
render (Rect (ev->area.x, ev->area.y, ev->area.x + ev->area.width, ev->area.y + ev->area.height), draw_context);
|
||||
#else
|
||||
|
||||
} else {
|
||||
GdkRectangle* rects;
|
||||
gint nrects;
|
||||
|
||||
|
|
@ -800,7 +801,7 @@ GtkCanvas::on_expose_event (GdkEventExpose* ev)
|
|||
render (Rect (rects[n].x, rects[n].y, rects[n].x + rects[n].width, rects[n].y + rects[n].height), draw_context);
|
||||
}
|
||||
g_free (rects);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef USE_CAIRO_IMAGE_SURFACE
|
||||
/* now blit our private surface back to the GDK one */
|
||||
|
|
|
|||
|
|
@ -226,6 +226,8 @@ private:
|
|||
/** the item that currently has key focus or 0 */
|
||||
Item * _focused_item;
|
||||
|
||||
bool _single_exposure;
|
||||
|
||||
sigc::connection tooltip_timeout_connection;
|
||||
Item* current_tooltip_item;
|
||||
Gtk::Window* tooltip_window;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue