gdk: Remove unused _gdk_window_calculate_full_clip_region

This commit is contained in:
Alexander Larsson 2011-12-05 10:59:07 +01:00
parent f00cfe1fac
commit 68843a3e93
2 changed files with 0 additions and 113 deletions

View File

@ -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);

View File

@ -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)