[gimp] Bug 676667 - Splash image display in splash screen is delayed



commit 568aa7a5b0078ab42ffff2196ccda20dafa0537b
Author: Michael Natterer <mitch gimp org>
Date:   Mon Nov 5 01:44:53 2012 +0100

    Bug 676667 - Splash image display in splash screen is delayed
    
    Throw away the code that sets the splash image as window background
    and always use GtkImage. Due to internal GDK changes since this code
    was written, this is now the way to avoid any delay when showing the
    image, for whatever reason.

 app/gui/splash.c |   34 +---------------------------------
 1 files changed, 1 insertions(+), 33 deletions(-)
---
diff --git a/app/gui/splash.c b/app/gui/splash.c
index 84ff914..5481947 100644
--- a/app/gui/splash.c
+++ b/app/gui/splash.c
@@ -139,18 +139,7 @@ splash_create (gboolean be_verbose)
   gtk_container_add (GTK_CONTAINER (frame), vbox);
   gtk_widget_show (vbox);
 
-  /*  If the splash image is static, we use a drawing area and set the
-   *  image as back pixmap, otherwise a GtkImage is being used.
-   */
-  if (gdk_pixbuf_animation_is_static_image (pixbuf))
-    {
-      splash->area = gtk_drawing_area_new ();
-    }
-  else
-    {
-      splash->area = gtk_image_new_from_animation (pixbuf);
-    }
-
+  splash->area = gtk_image_new_from_animation (pixbuf);
   gtk_box_pack_start (GTK_BOX (vbox), splash->area, TRUE, TRUE, 0);
   gtk_widget_show (splash->area);
 
@@ -168,27 +157,6 @@ splash_create (gboolean be_verbose)
                             gdk_pixbuf_animation_get_static_image (pixbuf),
                             &splash->color);
 
-  gtk_widget_realize (splash->area);
-
-  if (gdk_pixbuf_animation_is_static_image (pixbuf))
-    {
-      GdkPixbuf *static_pixbuf = gdk_pixbuf_animation_get_static_image (pixbuf);
-      GdkPixmap *pixmap;
-      cairo_t   *cr;
-
-      pixmap = gdk_pixmap_new (gtk_widget_get_window (splash->area),
-                               splash->width, splash->height, -1);
-
-      cr = gdk_cairo_create (pixmap);
-      gdk_cairo_set_source_pixbuf (cr, static_pixbuf, 0.0, 0.0);
-      cairo_paint (cr);
-      cairo_destroy (cr);
-
-      gdk_window_set_back_pixmap (gtk_widget_get_window (splash->area),
-                                  pixmap, FALSE);
-      g_object_unref (pixmap);
-    }
-
   g_object_unref (pixbuf);
 
   g_signal_connect_after (splash->area, "expose-event",



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