[gtk+/rendering-cleanup: 25/41] API: gdk: Don't track outstanding surfaces
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/rendering-cleanup: 25/41] API: gdk: Don't track outstanding surfaces
- Date: Tue, 23 Nov 2010 00:23:42 +0000 (UTC)
commit ead5eeabec6d5a2218c556275e82bdac3c5b5ee2
Author: Benjamin Otte <otte redhat com>
Date: Thu Oct 7 21:32:05 2010 +0200
API: gdk: Don't track outstanding surfaces
You are not allowed to track surfaces from GDK or draw outside of expose
events. So we can remove ugly hacks needed previously. See
https://bugzilla.gnome.org/show_bug.cgi?id=606009 for the introduction
of this workaround.
gdk/gdkinternals.h | 1 -
gdk/gdkwindow.c | 12 +-----------
2 files changed, 1 insertions(+), 12 deletions(-)
---
diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h
index e1b458e..93647ad 100644
--- a/gdk/gdkinternals.h
+++ b/gdk/gdkinternals.h
@@ -261,7 +261,6 @@ struct _GdkWindowObject
cairo_region_t *input_shape;
cairo_surface_t *cairo_surface;
- guint outstanding_surfaces; /* only set on impl window */
GList *devices_inside;
GHashTable *device_events;
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index adc9d70..9fbd321 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -2774,9 +2774,6 @@ gdk_window_begin_implicit_paint (GdkWindow *window, GdkRectangle *rect)
private->implicit_paint != NULL)
return FALSE; /* Don't stack implicit paints */
- if (private->outstanding_surfaces != 0)
- return FALSE; /* May conflict with direct drawing to cairo surface */
-
/* Never do implicit paints for foreign windows, they don't need
* double buffer combination since they have no client side children,
* and creating surfaces for them is risky since they could disappear
@@ -3383,11 +3380,7 @@ move_region_on_impl (GdkWindowObject *impl_window,
cairo_region_destroy (exposing);
}
- if (impl_window->outstanding_surfaces == 0) /* Enable flicker free handling of moves. */
- append_move_region (impl_window, region, dx, dy);
- else
- do_move_region_bits_on_impl (impl_window,
- region, dx, dy);
+ append_move_region (impl_window, region, dx, dy);
cairo_region_destroy (region);
}
@@ -3692,7 +3685,6 @@ gdk_window_cairo_surface_destroy (void *data)
GdkWindowObject *private = (GdkWindowObject*) data;
private->cairo_surface = NULL;
- private->impl_window->outstanding_surfaces--;
}
static cairo_surface_t *
@@ -3744,8 +3736,6 @@ gdk_window_ref_cairo_surface (GdkDrawable *drawable)
if (private->cairo_surface)
{
- private->impl_window->outstanding_surfaces++;
-
cairo_surface_set_user_data (private->cairo_surface, &gdk_window_cairo_key,
drawable, gdk_window_cairo_surface_destroy);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]