[gtk+] gdkwindow: Remove an unused assignment



commit ad6f4926b6224b823abea3f71f0b080c31bac9e1
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Mon Dec 2 10:41:38 2013 +0000

    gdkwindow: Remove an unused assignment
    
    scale is only used if HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE is defined.
    
    Found with scan-build.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=712760

 gdk/gdkwindow.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 63bc225..55b37b3 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -9338,9 +9338,6 @@ gdk_window_create_similar_image_surface (GdkWindow *     window,
       window = gdk_screen_get_root_window (screen);
     }
 
-  if (scale == 0)
-    scale = gdk_window_get_scale_factor (window);
-
   impl_class = GDK_WINDOW_IMPL_GET_CLASS (window->impl);
 
   if (impl_class->create_similar_image_surface)
@@ -9357,6 +9354,9 @@ gdk_window_create_similar_image_surface (GdkWindow *     window,
     }
 
 #ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
+  if (scale == 0)
+    scale = gdk_window_get_scale_factor (window);
+
   cairo_surface_set_device_scale (surface, scale, scale);
 #endif
 


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