[gtk+] quartz: Don't bother storing the paint_clip_region
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] quartz: Don't bother storing the paint_clip_region
- Date: Sat, 22 Nov 2014 18:39:24 +0000 (UTC)
commit ec2925a5bf67fc4aed45cd42d68fd00735ae90a5
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sat Nov 22 08:06:09 2014 -0800
quartz: Don't bother storing the paint_clip_region
It's unused.
gdk/quartz/gdkwindow-quartz.c | 55 -----------------------------------------
gdk/quartz/gdkwindow-quartz.h | 1 -
2 files changed, 0 insertions(+), 56 deletions(-)
---
diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
index c793705..68ec2bd 100644
--- a/gdk/quartz/gdkwindow-quartz.c
+++ b/gdk/quartz/gdkwindow-quartz.c
@@ -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,61 +337,10 @@ 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;
diff --git a/gdk/quartz/gdkwindow-quartz.h b/gdk/quartz/gdkwindow-quartz.h
index d1b5665..ccd7633 100644
--- a/gdk/quartz/gdkwindow-quartz.h
+++ b/gdk/quartz/gdkwindow-quartz.h
@@ -50,7 +50,6 @@ struct _GdkWindowImplQuartz
GdkWindowTypeHint type_hint;
- cairo_region_t *paint_clip_region;
gint in_paint_rect_count;
GdkWindow *transient_for;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]