[gtk+] themingengine: Remove unnecessary optimization



commit 06642cab56eb4f30de54b94079687bf2be514ad5
Author: Benjamin Otte <otte redhat com>
Date:   Sat Jun 11 01:32:43 2011 +0200

    themingengine: Remove unnecessary optimization
    
    Code is likely as fast or faster without it, and this saves code.

 gtk/gtkthemingengine.c |   37 ++++++-------------------------------
 1 files changed, 6 insertions(+), 31 deletions(-)
---
diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c
index dc59928..6c5d5f0 100644
--- a/gtk/gtkthemingengine.c
+++ b/gtk/gtkthemingengine.c
@@ -1957,37 +1957,12 @@ render_frame_internal (GtkThemingEngine *engine,
 
       gdk_cairo_set_source_rgba (cr, &border_color);
 
-      if (uniform_border)
-        {
-          if (border_width > 1)
-            {
-              x += (gdouble) border_width / 2;
-              y += (gdouble) border_width / 2;
-              width -= border_width;
-              height -= border_width;
-            }
-          else if (border_width == 1)
-            {
-              x += 0.5;
-              y += 0.5;
-              width -= 1;
-              height -= 1;
-            }
-
-          _cairo_round_rectangle_sides (cr, &border_radius,
-                                        x, y, width, height,
-                                        SIDE_ALL & ~(hidden_side));
-          cairo_stroke (cr);
-        }
-      else
-        {
-          cairo_save (cr);
-          _cairo_uneven_frame (cr, &border_radius,
-                               x, y, width, height,
-                               &border);
-          cairo_fill (cr);
-          cairo_restore (cr);
-        }
+      cairo_save (cr);
+      _cairo_uneven_frame (cr, &border_radius,
+                           x, y, width, height,
+                           &border);
+      cairo_fill (cr);
+      cairo_restore (cr);
 
       break;
     case GTK_BORDER_STYLE_INSET:



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