[gtk+] gtkcssshadowvalue: Use the blur surface as a mask, instead of painting it
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtkcssshadowvalue: Use the blur surface as a mask, instead of painting it
- Date: Tue, 29 Jul 2014 11:11:45 +0000 (UTC)
commit 227b4a862085e233baa5de8ba143309954bae541
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Jul 28 22:04:09 2014 +0200
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.
gtk/gtkcssshadowvalue.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcssshadowvalue.c b/gtk/gtkcssshadowvalue.c
index 87300dc..da6d08c 100644
--- a/gtk/gtkcssshadowvalue.c
+++ b/gtk/gtkcssshadowvalue.c
@@ -366,8 +366,8 @@ gtk_css_shadow_value_finish_drawing (const GtkCssValue *shadow,
/* Blur the surface. */
_gtk_cairo_blur_surface (surface, radius);
- cairo_set_source_surface (original_cr, surface, 0, 0);
- cairo_paint (original_cr);
+ gdk_cairo_set_source_rgba (original_cr, _gtk_css_rgba_value_get_rgba (shadow->color));
+ cairo_mask_surface (original_cr, surface, 0, 0);
cairo_destroy (cr);
cairo_surface_destroy (surface);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]