gtkcssshadowvalue: Use the blur surface as a mask, instead of painting it

This will make it easier to use an A8 for our blurred surface instead of
a ARGB32, which makes things a lot easier and faster.
This commit is contained in:
Jasper St. Pierre 2014-07-28 22:04:09 +02:00
parent 09a36b1e9f
commit 227b4a8620

View File

@ -366,8 +366,8 @@ gtk_css_shadow_value_finish_drawing (const GtkCssValue *shadow,
/* Blur the surface. */ /* Blur the surface. */
_gtk_cairo_blur_surface (surface, radius); _gtk_cairo_blur_surface (surface, radius);
cairo_set_source_surface (original_cr, surface, 0, 0); gdk_cairo_set_source_rgba (original_cr, _gtk_css_rgba_value_get_rgba (shadow->color));
cairo_paint (original_cr); cairo_mask_surface (original_cr, surface, 0, 0);
cairo_destroy (cr); cairo_destroy (cr);
cairo_surface_destroy (surface); cairo_surface_destroy (surface);