Commit d0791384 authored by Alexander Larsson's avatar Alexander Larsson

PixelCache: Ensure clean cairo_t state in draw

This adds save/restore calls to the clear-to-transparent call in
the pixel cache, to avoid changing the default color of the
cairo_t. It also removes a call set_operator call that is no longer
necessary (it was trying to manually restore the state).
parent 256561db
......@@ -340,12 +340,13 @@ _gtk_pixel_cache_repaint (GtkPixelCache *cache,
cairo_translate (backing_cr,
-cache->surface_x - canvas_rect->x - view_rect->x,
-cache->surface_y - canvas_rect->y - view_rect->y);
cairo_save (backing_cr);
cairo_set_source_rgba (backing_cr,
0.0, 0, 0, 0.0);
cairo_set_operator (backing_cr, CAIRO_OPERATOR_SOURCE);
cairo_paint (backing_cr);
cairo_set_operator (backing_cr, CAIRO_OPERATOR_OVER);
cairo_restore (backing_cr);
cairo_save (backing_cr);
draw (backing_cr, user_data);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment