[Xfce4-commits] [xfce/thunar] 01/02: Revert "Fallback to image surface, workaround for bug in Cairo/RENDER"
noreply at xfce.org
noreply at xfce.org
Thu Jan 29 01:58:19 CET 2015
This is an automated email from the git hooks/post-receive script.
andrzejr pushed a commit to branch master
in repository xfce/thunar.
commit 18604fad027e35d7a3f343879fc41dbf65c21e4e
Author: Andrzej <ndrwrdck at gmail.com>
Date: Thu Jan 29 00:11:30 2015 +0000
Revert "Fallback to image surface, workaround for bug in Cairo/RENDER"
This reverts commit 78a3cba27cecbc13d078c127aa2acabae6048904.
---
thunar/thunar-icon-renderer.c | 34 ----------------------------------
1 file changed, 34 deletions(-)
diff --git a/thunar/thunar-icon-renderer.c b/thunar/thunar-icon-renderer.c
index fced6f4..8ffa0d3 100644
--- a/thunar/thunar-icon-renderer.c
+++ b/thunar/thunar-icon-renderer.c
@@ -315,52 +315,18 @@ thunar_icon_renderer_color_selected (cairo_t *cr,
cairo_pattern_t *source;
GtkStateType state;
-#ifdef CAIRO_BUG_72551_FIXED
cairo_save (cr);
source = cairo_pattern_reference (cairo_get_source (cr));
state = gtk_widget_has_focus (widget) ? GTK_STATE_SELECTED : GTK_STATE_ACTIVE;
gdk_cairo_set_source_color (cr, &widget->style->base[state]);
cairo_set_operator (cr, CAIRO_OPERATOR_MULTIPLY);
- cairo_mask (cr, source);
-#else /* fallback for RENDER error */
/* CAIRO_OPERATOR_MULTIPLY */
/* causes libx11 error: error_code 2 request_code 155 minor_code 8 */
/* with x11 1.0.3, xrender 0.9.1, cairo 1.12.2 */
/* cairo_mask (cr, source); */
- cairo_surface_t *target, *image_surface;
- cairo_t *image_cr;
- double x1, y1, x2, y2;
-
- cairo_save (cr);
-
- /* copy xlib surface to an image surface */
- cairo_clip_extents(cr, &x1, &y1, &x2, &y2);
- target = cairo_get_target (cr);
- image_surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, x2, y2);
- image_cr = cairo_create (image_surface);
- cairo_set_source_surface(image_cr, target, 0, 0);
- cairo_set_operator(image_cr, CAIRO_OPERATOR_SOURCE);
- cairo_paint(image_cr);
-
- /* render on the image surface */
- source = cairo_pattern_reference (cairo_get_source (cr));
- state = gtk_widget_has_focus (widget) ? GTK_STATE_SELECTED : GTK_STATE_ACTIVE;
- gdk_cairo_set_source_color (image_cr, &widget->style->base[state]);
- cairo_set_operator (image_cr, CAIRO_OPERATOR_MULTIPLY);
- cairo_mask (image_cr, source);
-
- /* copy the image surface back to xlib one and clean up */
- cairo_set_source_surface (cr, image_surface, 0, 0);
- cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
- cairo_paint(cr);
-
- cairo_destroy (image_cr);
- cairo_surface_destroy (image_surface);
-#endif
-
cairo_pattern_destroy (source);
cairo_restore (cr);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list