[gtk+] offscreenwindow: Copy old to new pixmap using Cairo



commit 2db020890e3831abe3940673977989bf7544d516
Author: Benjamin Otte <otte redhat com>
Date:   Sat Jul 17 03:15:33 2010 +0200

    offscreenwindow: Copy old to new pixmap using Cairo

 gdk/gdkoffscreenwindow.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/gdk/gdkoffscreenwindow.c b/gdk/gdkoffscreenwindow.c
index b6bc3b4..10bba66 100644
--- a/gdk/gdkoffscreenwindow.c
+++ b/gdk/gdkoffscreenwindow.c
@@ -873,6 +873,8 @@ gdk_offscreen_window_move_resize_internal (GdkWindow *window,
   if (private->width != width ||
       private->height != height)
     {
+      cairo_t *cr;
+
       private->width = width;
       private->height = height;
 
@@ -882,13 +884,10 @@ gdk_offscreen_window_move_resize_internal (GdkWindow *window,
 					  height,
 					  private->depth);
 
-      gc = _gdk_drawable_get_scratch_gc (offscreen->pixmap, FALSE);
-      gdk_draw_drawable (offscreen->pixmap,
-			 gc,
-			 old_pixmap,
-			 0,0, 0, 0,
-			 -1, -1);
-      g_object_unref (old_pixmap);
+      cr = gdk_cairo_create (offscreen->pixmap);
+      gdk_cairo_set_source_pixmap (cr, old_pixmap, 0, 0);
+      cairo_paint (cr);
+      cairo_destroy (cr);
     }
 
   if (GDK_WINDOW_IS_MAPPED (private))



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