[gtk+/wip/pango-shadow-cache-2: 67/68] cssshadowvalue: Remove the move_to in paint_layout



commit 2d73e0ca97ab869808d2f2d6579bc2d1a64ae318
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Sep 3 09:15:09 2014 -0700

    cssshadowvalue: Remove the move_to in paint_layout
    
    _gtk_css_shadow_value_paint_layout is always called from
    gtk_theming_engine_render_layout, which always moves the current point
    on the context.
    
    Since we should always have a current point before calling this
    function, add an assert do validate that assumption.

 gtk/gtkcssshadowvalue.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcssshadowvalue.c b/gtk/gtkcssshadowvalue.c
index 42e1d68..a2d0ee5 100644
--- a/gtk/gtkcssshadowvalue.c
+++ b/gtk/gtkcssshadowvalue.c
@@ -393,8 +393,7 @@ _gtk_css_shadow_value_paint_layout (const GtkCssValue *shadow,
 {
   g_return_if_fail (shadow->class == &GTK_CSS_VALUE_SHADOW);
 
-  if (!cairo_has_current_point (cr))
-    cairo_move_to (cr, 0, 0);
+  g_assert (cairo_has_current_point (cr));
 
   cairo_save (cr);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]