mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-09 23:25:43 +01:00
[Summary] No chance of using cairo image surface
This commit is contained in:
parent
e85e5e3436
commit
c0defccf67
1 changed files with 3 additions and 3 deletions
|
|
@ -723,7 +723,7 @@ void
|
|||
GtkCanvas::on_size_allocate (Gtk::Allocation& a)
|
||||
{
|
||||
EventBox::on_size_allocate (a);
|
||||
#ifdef USE_CAIRO_IMAGE_SURFACE
|
||||
#ifdef USE_CAIRO_IMAGE_SURFACE_FOR_CANVAS
|
||||
/* allocate an image surface as large as the canvas itself */
|
||||
canvas_image.clear ();
|
||||
canvas_image = Cairo::ImageSurface::create (Cairo::FORMAT_ARGB32, a.get_width(), a.get_height());
|
||||
|
|
@ -737,7 +737,7 @@ GtkCanvas::on_size_allocate (Gtk::Allocation& a)
|
|||
bool
|
||||
GtkCanvas::on_expose_event (GdkEventExpose* ev)
|
||||
{
|
||||
#ifdef USE_CAIRO_IMAGE_SURFACE
|
||||
#ifdef USE_CAIRO_IMAGE_SURFACE_FOR_CANVAS
|
||||
if (!canvas_image) {
|
||||
canvas_image = Cairo::ImageSurface::create (Cairo::FORMAT_ARGB32, get_width(), get_height());
|
||||
}
|
||||
|
|
@ -764,7 +764,7 @@ GtkCanvas::on_expose_event (GdkEventExpose* ev)
|
|||
|
||||
render (Rect (ev->area.x, ev->area.y, ev->area.x + ev->area.width, ev->area.y + ev->area.height), draw_context);
|
||||
|
||||
#ifdef USE_CAIRO_IMAGE_SURFACE
|
||||
#ifdef USE_CAIRO_IMAGE_SURFACE_FOR_CANVAS
|
||||
/* now blit our private surface back to the GDK one */
|
||||
|
||||
window_context->rectangle (ev->area.x, ev->area.y, ev->area.width, ev->area.height);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue