[gtk+] stylecontext: Clear paths in gtk_render_foo()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] stylecontext: Clear paths in gtk_render_foo()
- Date: Fri, 26 Jul 2013 11:56:23 +0000 (UTC)
commit 9aab40b801be151323d5d299a0c2cddae5e0964b
Author: Martin Stransky <stransky redhat com>
Date: Fri Jul 26 13:24:53 2013 +0200
stylecontext: Clear paths in gtk_render_foo()
This ensures that existing paths are properly cleared and don't cause
spurious renderings.
https://bugzilla.gnome.org/show_bug.cgi?id=694086
gtk/gtkstylecontext.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index 5f8b8ff..93c5ef5 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -3801,6 +3801,7 @@ gtk_render_check (GtkStyleContext *context,
engine_class = GTK_THEMING_ENGINE_GET_CLASS (engine);
cairo_save (cr);
+ cairo_new_path (cr);
_gtk_theming_engine_set_context (engine, context);
@@ -3851,6 +3852,7 @@ gtk_render_option (GtkStyleContext *context,
engine_class = GTK_THEMING_ENGINE_GET_CLASS (engine);
cairo_save (cr);
+ cairo_new_path (cr);
_gtk_theming_engine_set_context (engine, context);
engine_class->render_option (engine, cr,
@@ -3898,6 +3900,7 @@ gtk_render_arrow (GtkStyleContext *context,
engine_class = GTK_THEMING_ENGINE_GET_CLASS (engine);
cairo_save (cr);
+ cairo_new_path (cr);
gtk_style_context_save (context);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_ARROW);
@@ -3952,6 +3955,7 @@ gtk_render_background (GtkStyleContext *context,
engine_class = GTK_THEMING_ENGINE_GET_CLASS (engine);
cairo_save (cr);
+ cairo_new_path (cr);
_gtk_theming_engine_set_context (engine, context);
engine_class->render_background (engine, cr, x, y, width, height);
@@ -4003,6 +4007,7 @@ gtk_render_frame (GtkStyleContext *context,
engine_class = GTK_THEMING_ENGINE_GET_CLASS (engine);
cairo_save (cr);
+ cairo_new_path (cr);
_gtk_theming_engine_set_context (engine, context);
engine_class->render_frame (engine, cr, x, y, width, height);
@@ -4051,6 +4056,7 @@ gtk_render_expander (GtkStyleContext *context,
engine_class = GTK_THEMING_ENGINE_GET_CLASS (engine);
cairo_save (cr);
+ cairo_new_path (cr);
_gtk_theming_engine_set_context (engine, context);
engine_class->render_expander (engine, cr, x, y, width, height);
@@ -4096,6 +4102,7 @@ gtk_render_focus (GtkStyleContext *context,
engine_class = GTK_THEMING_ENGINE_GET_CLASS (engine);
cairo_save (cr);
+ cairo_new_path (cr);
_gtk_theming_engine_set_context (engine, context);
engine_class->render_focus (engine, cr, x, y, width, height);
@@ -4134,6 +4141,7 @@ gtk_render_layout (GtkStyleContext *context,
engine_class = GTK_THEMING_ENGINE_GET_CLASS (engine);
cairo_save (cr);
+ cairo_new_path (cr);
pango_layout_get_extents (layout, &extents, NULL);
@@ -4174,6 +4182,7 @@ gtk_render_line (GtkStyleContext *context,
engine_class = GTK_THEMING_ENGINE_GET_CLASS (engine);
cairo_save (cr);
+ cairo_new_path (cr);
_gtk_theming_engine_set_context (engine, context);
engine_class->render_line (engine, cr, x0, y0, x1, y1);
@@ -4224,6 +4233,7 @@ gtk_render_slider (GtkStyleContext *context,
engine_class = GTK_THEMING_ENGINE_GET_CLASS (engine);
cairo_save (cr);
+ cairo_new_path (cr);
_gtk_theming_engine_set_context (engine, context);
engine_class->render_slider (engine, cr, x, y, width, height, orientation);
@@ -4287,6 +4297,7 @@ gtk_render_frame_gap (GtkStyleContext *context,
engine_class = GTK_THEMING_ENGINE_GET_CLASS (engine);
cairo_save (cr);
+ cairo_new_path (cr);
_gtk_theming_engine_set_context (engine, context);
engine_class->render_frame_gap (engine, cr,
@@ -4339,6 +4350,7 @@ gtk_render_extension (GtkStyleContext *context,
engine_class = GTK_THEMING_ENGINE_GET_CLASS (engine);
cairo_save (cr);
+ cairo_new_path (cr);
_gtk_theming_engine_set_context (engine, context);
engine_class->render_extension (engine, cr, x, y, width, height, gap_side);
@@ -4387,6 +4399,7 @@ gtk_render_handle (GtkStyleContext *context,
engine_class = GTK_THEMING_ENGINE_GET_CLASS (engine);
cairo_save (cr);
+ cairo_new_path (cr);
_gtk_theming_engine_set_context (engine, context);
engine_class->render_handle (engine, cr, x, y, width, height);
@@ -4430,6 +4443,7 @@ gtk_render_activity (GtkStyleContext *context,
engine_class = GTK_THEMING_ENGINE_GET_CLASS (engine);
cairo_save (cr);
+ cairo_new_path (cr);
_gtk_theming_engine_set_context (engine, context);
engine_class->render_activity (engine, cr, x, y, width, height);
@@ -4501,6 +4515,7 @@ gtk_render_icon (GtkStyleContext *context,
engine_class = GTK_THEMING_ENGINE_GET_CLASS (engine);
cairo_save (cr);
+ cairo_new_path (cr);
_gtk_theming_engine_set_context (engine, context);
engine_class->render_icon (engine, cr, pixbuf, x, y);
@@ -4537,6 +4552,7 @@ gtk_render_icon_surface (GtkStyleContext *context,
engine_class = GTK_THEMING_ENGINE_GET_CLASS (engine);
cairo_save (cr);
+ cairo_new_path (cr);
_gtk_theming_engine_set_context (engine, context);
engine_class->render_icon_surface (engine, cr, surface, x, y);
@@ -4562,6 +4578,7 @@ draw_insertion_cursor (GtkStyleContext *context,
gint offset;
cairo_save (cr);
+ cairo_new_path (cr);
_gtk_style_context_get_cursor_color (context, &primary_color, &secondary_color);
gdk_cairo_set_source_rgba (cr, is_primary ? &primary_color : &secondary_color);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]