[gtk+/transparent-windows] gdk: Remove unused _gdk_window_calculate_full_clip_region
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/transparent-windows] gdk: Remove unused _gdk_window_calculate_full_clip_region
- Date: Mon, 5 Dec 2011 13:02:59 +0000 (UTC)
commit 68843a3e93913c12d00b47380614f67e7e9763b4
Author: Alexander Larsson <alexl redhat com>
Date: Mon Dec 5 10:59:07 2011 +0100
gdk: Remove unused _gdk_window_calculate_full_clip_region
gdk/gdkinternals.h | 5 --
gdk/gdkwindow.c | 108 ----------------------------------------------------
2 files changed, 0 insertions(+), 113 deletions(-)
---
diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h
index 8567fd4..3042bcb 100644
--- a/gdk/gdkinternals.h
+++ b/gdk/gdkinternals.h
@@ -400,11 +400,6 @@ void _gdk_display_set_window_under_pointer (GdkDisplay *display,
void _gdk_synthesize_crossing_events_for_geometry_change (GdkWindow *changed_window);
-cairo_region_t *_gdk_window_calculate_full_clip_region (GdkWindow *window,
- GdkWindow *base_window,
- gboolean do_children,
- gint *base_x_offset,
- gint *base_y_offset);
gboolean _gdk_window_has_impl (GdkWindow *window);
GdkWindow * _gdk_window_get_impl_window (GdkWindow *window);
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 4c669b5..a3a6266 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -7631,114 +7631,6 @@ gdk_window_is_shaped (GdkWindow *window)
return window->shaped;
}
-static void
-window_get_size_rectangle (GdkWindow *window,
- GdkRectangle *rect)
-{
- rect->x = rect->y = 0;
- rect->width = window->width;
- rect->height = window->height;
-}
-
-/* Calculates the real clipping region for a window, in window coordinates,
- * taking into account other windows, gc clip region and gc clip mask.
- */
-cairo_region_t *
-_gdk_window_calculate_full_clip_region (GdkWindow *window,
- GdkWindow *base_window,
- gboolean do_children,
- gint *base_x_offset,
- gint *base_y_offset)
-{
- GdkRectangle visible_rect;
- cairo_region_t *real_clip_region;
- gint x_offset, y_offset;
- GdkWindow *parentwin, *lastwin;
-
- if (base_x_offset)
- *base_x_offset = 0;
- if (base_y_offset)
- *base_y_offset = 0;
-
- if (!window->viewable || window->input_only)
- return cairo_region_create ();
-
- window_get_size_rectangle (window, &visible_rect);
-
- /* real_clip_region is in window coordinates */
- real_clip_region = cairo_region_create_rectangle (&visible_rect);
-
- x_offset = y_offset = 0;
-
- lastwin = window;
- if (do_children)
- parentwin = lastwin;
- else
- parentwin = lastwin->parent;
-
- /* Remove the areas of all overlapping windows above parentwin in the hiearachy */
- for (; parentwin != NULL &&
- (parentwin == window || lastwin != base_window);
- lastwin = parentwin, parentwin = lastwin->parent)
- {
- GList *cur;
- GdkRectangle real_clip_rect;
-
- if (parentwin != window)
- {
- x_offset += lastwin->x;
- y_offset += lastwin->y;
- }
-
- /* children is ordered in reverse stack order */
- for (cur = parentwin->children;
- cur && cur->data != lastwin;
- cur = cur->next)
- {
- GdkWindow *child = cur->data;
-
- if (!GDK_WINDOW_IS_MAPPED (child) || child->input_only)
- continue;
-
- /* Ignore offscreen children, as they don't draw in their parent and
- * don't take part in the clipping */
- if (gdk_window_is_offscreen (child))
- continue;
-
- window_get_size_rectangle (child, &visible_rect);
-
- /* Convert rect to "window" coords */
- visible_rect.x += child->x - x_offset;
- visible_rect.y += child->y - y_offset;
-
- /* This shortcut is really necessary for performance when there are a lot of windows */
- cairo_region_get_extents (real_clip_region, &real_clip_rect);
- if (visible_rect.x >= real_clip_rect.x + real_clip_rect.width ||
- visible_rect.x + visible_rect.width <= real_clip_rect.x ||
- visible_rect.y >= real_clip_rect.y + real_clip_rect.height ||
- visible_rect.y + visible_rect.height <= real_clip_rect.y)
- continue;
-
- cairo_region_subtract_rectangle (real_clip_region, &visible_rect);
- }
-
- /* Clip to the parent */
- window_get_size_rectangle ((GdkWindow *)parentwin, &visible_rect);
- /* Convert rect to "window" coords */
- visible_rect.x += - x_offset;
- visible_rect.y += - y_offset;
-
- cairo_region_intersect_rectangle (real_clip_region, &visible_rect);
- }
-
- if (base_x_offset)
- *base_x_offset = x_offset;
- if (base_y_offset)
- *base_y_offset = y_offset;
-
- return real_clip_region;
-}
-
void
_gdk_window_add_damage (GdkWindow *toplevel,
cairo_region_t *damaged_region)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]