[gtk+/rendering-cleanup: 96/124] gdk: Do end_implicit_paint copy with Cairo



commit 8d649882621e19ce74aa4882efa118c41c34d806
Author: Benjamin Otte <otte redhat com>
Date:   Mon Jul 19 23:49:09 2010 +0200

    gdk: Do end_implicit_paint copy with Cairo

 gdk/gdkwindow.c |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 759886e..da10253 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -3135,17 +3135,21 @@ gdk_window_end_paint (GdkWindow *window)
 
   if (!paint->uses_implicit)
     {
+      cairo_t *cr;
+
       gdk_window_flush_outstanding_moves (window);
 
       full_clip = cairo_region_copy (private->clip_region_with_children);
       cairo_region_intersect (full_clip, paint->region);
-      _gdk_gc_set_clip_region_internal (tmp_gc, full_clip, TRUE); /* Takes ownership of full_clip */
-      gdk_gc_set_clip_origin (tmp_gc, - x_offset, - y_offset);
-      gdk_draw_drawable (private->impl, tmp_gc, paint->pixmap,
-			 clip_box.x - paint->x_offset,
-			 clip_box.y - paint->y_offset,
-			 clip_box.x - x_offset, clip_box.y - y_offset,
-			 clip_box.width, clip_box.height);
+
+      cr = gdk_cairo_create (private->impl);
+      gdk_cairo_set_source_pixmap (cr, paint->pixmap, 0, 0);
+      cairo_translate (cr, - x_offset, - y_offset);
+      gdk_cairo_region (cr, full_clip);
+      cairo_fill (cr);
+
+      cairo_destroy (cr);
+      cairo_region_destroy (full_clip);
     }
 
   if (private->redirect)



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