[Summary] No chance of using cairo image surface

This commit is contained in:
VKamyshniy 2014-11-20 21:04:24 +02:00
parent f1eb3f67c1
commit e85e5e3436
2 changed files with 4 additions and 4 deletions

View file

@ -55,7 +55,7 @@ CairoWidget::on_expose_event (GdkEventExpose *ev)
expose_area.width = ev->area.width;
expose_area.height = ev->area.height;
#ifdef USE_CAIRO_IMAGE_SURFACE
#ifdef USE_CAIRO_IMAGE_SURFACE_FOR_CAIRO_WIDGET
Cairo::RefPtr<Cairo::Context> cr;
if (get_visible_window ()) {
expose_area.x = 0;
@ -90,7 +90,7 @@ CairoWidget::on_expose_event (GdkEventExpose *ev)
render (cr->cobj(), &expose_area);
#ifdef USE_CAIRO_IMAGE_SURFACE
#ifdef USE_CAIRO_IMAGE_SURFACE_FOR_CAIRO_WIDGET
if(get_visible_window ()) {
_image_surface->flush();
/* now blit our private surface back to the GDK one */
@ -133,7 +133,7 @@ CairoWidget::on_size_allocate (Gtk::Allocation& alloc)
{
Gtk::EventBox::on_size_allocate (alloc);
#ifdef USE_CAIRO_IMAGE_SURFACE
#ifdef USE_CAIRO_IMAGE_SURFACE_FOR_CAIRO_WIDGET
_image_surface = Cairo::ImageSurface::create (Cairo::FORMAT_ARGB32, alloc.get_width(), alloc.get_height());
#endif

View file

@ -109,7 +109,7 @@ protected:
static sigc::slot<void> focus_handler;
private:
#ifdef USE_CAIRO_IMAGE_SURFACE
#ifdef USE_CAIRO_IMAGE_SURFACE_FOR_CANVAS
Cairo::RefPtr<Cairo::Surface> _image_surface;
#endif
Glib::SignalProxyProperty _name_proxy;