[gtk+/rendering-cleanup: 22/41] xxx: gdk_cairo_create_for_impl()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/rendering-cleanup: 22/41] xxx: gdk_cairo_create_for_impl()
- Date: Tue, 23 Nov 2010 00:23:26 +0000 (UTC)
commit a1c6e2a0a83a15b0c6f43f1db68f0eef8aef9aa0
Author: Benjamin Otte <otte redhat com>
Date: Wed Oct 6 23:42:32 2010 +0200
xxx: gdk_cairo_create_for_impl()
gdk/gdkwindow.c | 21 +++++++++++++++++++--
1 files changed, 19 insertions(+), 2 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index c0eef79..33b0778 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -2803,6 +2803,23 @@ gdk_window_begin_implicit_paint (GdkWindow *window, GdkRectangle *rect)
return TRUE;
}
+static cairo_t *
+gdk_cairo_create_for_impl (GdkWindow *window)
+{
+ GdkWindowObject *priv;
+ cairo_surface_t *surface;
+ cairo_t *cr;
+
+ priv = (GdkWindowObject*) window;
+
+ surface = _gdk_drawable_ref_cairo_surface (priv->impl);
+ cr = cairo_create (surface);
+
+ cairo_surface_destroy (surface);
+
+ return cr;
+}
+
/* Ensure that all content related to this (sub)window is pushed to the
native region. If there is an active paint then that area is not
pushed, in order to not show partially finished double buffers. */
@@ -2843,7 +2860,7 @@ gdk_window_flush_implicit_paint (GdkWindow *window)
cairo_region_subtract (paint->region, region);
/* Some regions are valid, push these to window now */
- cr = gdk_cairo_create (private->impl);
+ cr = gdk_cairo_create_for_impl (window);
gdk_cairo_region (cr, region);
cairo_clip (cr);
cairo_set_source_surface (cr, paint->surface, 0, 0);
@@ -2875,7 +2892,7 @@ gdk_window_end_implicit_paint (GdkWindow *window)
cairo_t *cr;
/* Some regions are valid, push these to window now */
- cr = gdk_cairo_create (private->impl);
+ cr = gdk_cairo_create_for_impl (window);
gdk_cairo_region (cr, paint->region);
cairo_clip (cr);
cairo_set_source_surface (cr, paint->surface, 0, 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]