Deprecate the GdkRegion API
Includes fixing all callers to use the cairo region API instead. This is usually just replacing the function names, the only difference is gdk_region_get_rectangles() being replaced by cairo_region_num_rectangles() and cairo_region_get_rectangle() which required a bit more work. https://bugzilla.gnome.org/show_bug.cgi?id=613284
This commit is contained in:
@ -252,26 +252,26 @@ gdk_window_clip_changed (GdkWindow *window,
|
||||
obj = (GdkWindowObject *) window;
|
||||
impl = GDK_WINDOW_IMPL_WIN32 (obj->impl);
|
||||
|
||||
old_clip_region = gdk_region_rectangle (old_clip);
|
||||
new_clip_region = gdk_region_rectangle (new_clip);
|
||||
old_clip_region = cairo_region_create_rectangle (old_clip);
|
||||
new_clip_region = cairo_region_create_rectangle (new_clip);
|
||||
|
||||
/* Trim invalid region of window to new clip rectangle
|
||||
*/
|
||||
if (obj->update_area)
|
||||
gdk_region_intersect (obj->update_area, new_clip_region);
|
||||
cairo_region_intersect (obj->update_area, new_clip_region);
|
||||
|
||||
/* Invalidate newly exposed portion of window
|
||||
*/
|
||||
gdk_region_subtract (new_clip_region, old_clip_region);
|
||||
if (!gdk_region_empty (new_clip_region))
|
||||
cairo_region_subtract (new_clip_region, old_clip_region);
|
||||
if (!cairo_region_is_empty (new_clip_region))
|
||||
gdk_window_tmp_unset_bg (window);
|
||||
else
|
||||
{
|
||||
gdk_region_destroy (new_clip_region);
|
||||
cairo_region_destroy (new_clip_region);
|
||||
new_clip_region = NULL;
|
||||
}
|
||||
|
||||
gdk_region_destroy (old_clip_region);
|
||||
cairo_region_destroy (old_clip_region);
|
||||
|
||||
return new_clip_region;
|
||||
}
|
||||
@ -288,7 +288,7 @@ gdk_window_post_scroll (GdkWindow *window,
|
||||
|
||||
gdk_window_invalidate_region (window, new_clip_region, FALSE);
|
||||
g_print ("gdk_window_post_scroll\n");
|
||||
gdk_region_destroy (new_clip_region);
|
||||
cairo_region_destroy (new_clip_region);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user