[gtk+/rendering-cleanup: 39/92] gdk: Remove GdkWindowImpl->clear_region
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/rendering-cleanup: 39/92] gdk: Remove GdkWindowImpl->clear_region
- Date: Fri, 27 Aug 2010 15:16:53 +0000 (UTC)
commit 5163a92c96f69c67bd8645fbf20586050b3e8de9
Author: Benjamin Otte <otte redhat com>
Date: Sun Aug 15 03:16:20 2010 +0200
gdk: Remove GdkWindowImpl->clear_region
It was only used on the X11 backend and is easier to implement locally,
in particular when we want to allow backgrounds that X can't handle.
gdk/gdkwindow.c | 27 +++------------------------
gdk/gdkwindowimpl.h | 3 ---
gdk/x11/gdkwindow-x11.c | 21 ---------------------
3 files changed, 3 insertions(+), 48 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 201c47f..83089b5 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -3840,7 +3840,6 @@ gdk_window_clear_region_internal (GdkWindow *window,
gboolean send_expose)
{
GdkWindowObject *private = (GdkWindowObject *)window;
- GdkWindowImplIface *impl_iface;
if (private->paint_stack)
gdk_window_clear_backing_region (window, region);
@@ -3849,29 +3848,9 @@ gdk_window_clear_region_internal (GdkWindow *window,
if (private->redirect)
gdk_window_clear_backing_region_redirect (window, region);
- impl_iface = GDK_WINDOW_IMPL_GET_IFACE (private->impl);
-
- if (impl_iface->clear_region && clears_as_native (private))
- {
- cairo_region_t *copy;
- copy = cairo_region_copy (region);
- cairo_region_intersect (copy,
- private->clip_region_with_children);
-
-
- /* Drawing directly to the window, flush anything outstanding to
- guarantee ordering. */
- gdk_window_flush (window);
- impl_iface->clear_region (window, copy, send_expose);
-
- cairo_region_destroy (copy);
- }
- else
- {
- gdk_window_clear_backing_region_direct (window, region);
- if (send_expose)
- gdk_window_invalidate_region (window, region, FALSE);
- }
+ gdk_window_clear_backing_region_direct (window, region);
+ if (send_expose)
+ gdk_window_invalidate_region (window, region, FALSE);
}
}
diff --git a/gdk/gdkwindowimpl.h b/gdk/gdkwindowimpl.h
index a01244e..a2bb8f6 100644
--- a/gdk/gdkwindowimpl.h
+++ b/gdk/gdkwindowimpl.h
@@ -74,9 +74,6 @@ struct _GdkWindowImplIface
GdkWindow *new_parent,
gint x,
gint y);
- void (* clear_region) (GdkWindow *window,
- cairo_region_t *region,
- gboolean send_expose);
void (* set_device_cursor) (GdkWindow *window,
GdkDevice *device,
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 8c64256..5ff22c3 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -1670,26 +1670,6 @@ gdk_window_x11_reparent (GdkWindow *window,
}
static void
-gdk_window_x11_clear_region (GdkWindow *window,
- cairo_region_t *region,
- gboolean send_expose)
-{
- cairo_rectangle_int_t rect;
- int n_rects, i;
-
- n_rects = cairo_region_num_rectangles (region);
-
- for (i = 0; i < n_rects; i++)
- {
- cairo_region_get_rectangle (region, i, &rect);
- XClearArea (GDK_WINDOW_XDISPLAY (window), GDK_WINDOW_XID (window),
- rect.x, rect.y,
- rect.width, rect.height,
- send_expose);
- }
-}
-
-static void
gdk_window_x11_raise (GdkWindow *window)
{
XRaiseWindow (GDK_WINDOW_XDISPLAY (window), GDK_WINDOW_XID (window));
@@ -5536,7 +5516,6 @@ gdk_window_impl_iface_init (GdkWindowImplIface *iface)
iface->set_background = gdk_window_x11_set_background;
iface->set_back_pixmap = gdk_window_x11_set_back_pixmap;
iface->reparent = gdk_window_x11_reparent;
- iface->clear_region = gdk_window_x11_clear_region;
iface->set_device_cursor = gdk_window_x11_set_device_cursor;
iface->get_geometry = gdk_window_x11_get_geometry;
iface->get_root_coords = gdk_window_x11_get_root_coords;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]