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



commit b447b8e85f4094641497a02ca3b51372d4c3a543
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.
    (cherry picked from commit 568aa7a5b0078ab42ffff2196ccda20dafa0537b)

 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 9e3dd63..e09e08f 100644
--- a/app/gui/splash.c
+++ b/app/gui/splash.c
@@ -138,18 +138,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);
 
@@ -167,27 +156,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]