quartz: Don't bother storing the paint_clip_region

It's unused.
This commit is contained in:
Jasper St. Pierre 2014-11-22 08:06:09 -08:00
parent 1730bb0e81
commit ec2925a5bf
2 changed files with 0 additions and 56 deletions

View File

@ -211,9 +211,6 @@ gdk_window_impl_quartz_finalize (GObject *object)
check_grab_destroy (GDK_WINDOW_IMPL_QUARTZ (object)->wrapper);
if (impl->paint_clip_region)
cairo_region_destroy (impl->paint_clip_region);
if (impl->transient_for)
g_object_unref (impl->transient_for);
@ -340,60 +337,9 @@ static gboolean
gdk_window_impl_quartz_begin_paint_region (GdkWindow *window,
const cairo_region_t *region)
{
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
cairo_region_t *clipped_and_offset_region;
cairo_t *cr;
clipped_and_offset_region = cairo_region_copy (region);
cairo_region_intersect (clipped_and_offset_region,
window->clip_region);
cairo_region_translate (clipped_and_offset_region,
window->abs_x, window->abs_y);
impl->paint_clip_region = cairo_region_reference (clipped_and_offset_region);
if (cairo_region_is_empty (clipped_and_offset_region))
goto done;
cr = gdk_cairo_create (window);
cairo_translate (cr, -window->abs_x, -window->abs_y);
gdk_cairo_region (cr, clipped_and_offset_region);
cairo_clip (cr);
while (window->background == NULL && window->parent)
{
cairo_translate (cr, -window->x, window->y);
window = window->parent;
}
if (window->background)
cairo_set_source (cr, window->background);
else
cairo_set_source_rgba (cr, 0, 0, 0, 0);
/* Can use cairo_paint() here, we clipped above */
cairo_paint (cr);
cairo_destroy (cr);
done:
cairo_region_destroy (clipped_and_offset_region);
return FALSE;
}
static void
gdk_window_impl_quartz_end_paint (GdkWindow *window)
{
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
cairo_region_destroy (impl->paint_clip_region);
impl->paint_clip_region = NULL;
}
static void
gdk_quartz_window_set_needs_display_in_region (GdkWindow *window,
cairo_region_t *region)
@ -2947,7 +2893,6 @@ gdk_window_impl_quartz_class_init (GdkWindowImplQuartzClass *klass)
impl_class->get_shape = gdk_quartz_window_get_shape;
impl_class->get_input_shape = gdk_quartz_window_get_input_shape;
impl_class->begin_paint_region = gdk_window_impl_quartz_begin_paint_region;
impl_class->end_paint = gdk_window_impl_quartz_end_paint;
impl_class->get_scale_factor = gdk_quartz_window_get_scale_factor;
impl_class->focus = gdk_quartz_window_focus;

View File

@ -50,7 +50,6 @@ struct _GdkWindowImplQuartz
GdkWindowTypeHint type_hint;
cairo_region_t *paint_clip_region;
gint in_paint_rect_count;
GdkWindow *transient_for;