[gtk+/rendering-cleanup: 39/142] gdk: Remove GdkWindowImpl->clear_region
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/rendering-cleanup: 39/142] gdk: Remove GdkWindowImpl->clear_region
- Date: Tue, 14 Sep 2010 15:38:12 +0000 (UTC)
commit a7a01c575a067a081bff89895cced2953ffaa132
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 231cc2f..a5f7d87 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -3837,7 +3837,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);
@@ -3846,29 +3845,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 0b9f507..fcb8ba2 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 b7f7d26..41af53b 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -1662,26 +1662,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));
@@ -5476,7 +5456,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]