[gtk+/rendering-cleanup: 54/75] gdk: remove get_composite_drawable vfunc
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/rendering-cleanup: 54/75] gdk: remove get_composite_drawable vfunc
- Date: Wed, 4 Aug 2010 22:05:30 +0000 (UTC)
commit 108adc1fa32a85c514448df2afded65b76cfbdc8
Author: Benjamin Otte <otte redhat com>
Date: Wed Jul 21 21:13:23 2010 +0200
gdk: remove get_composite_drawable vfunc
The vfunc is not used anymore.
gdk/gdkdraw.c | 25 ---------
gdk/gdkdrawable.h | 8 ---
gdk/gdkoffscreenwindow.c | 15 -----
gdk/gdkwindow.c | 136 ----------------------------------------------
4 files changed, 0 insertions(+), 184 deletions(-)
---
diff --git a/gdk/gdkdraw.c b/gdk/gdkdraw.c
index 1b58722..3c8152e 100644
--- a/gdk/gdkdraw.c
+++ b/gdk/gdkdraw.c
@@ -36,13 +36,6 @@
#include "gdkpixbuf.h"
-static GdkDrawable* gdk_drawable_real_get_composite_drawable (GdkDrawable *drawable,
- gint x,
- gint y,
- gint width,
- gint height,
- gint *composite_x_offset,
- gint *composite_y_offset);
static cairo_region_t * gdk_drawable_real_get_visible_region (GdkDrawable *drawable);
@@ -51,7 +44,6 @@ G_DEFINE_ABSTRACT_TYPE (GdkDrawable, gdk_drawable, G_TYPE_OBJECT)
static void
gdk_drawable_class_init (GdkDrawableClass *klass)
{
- klass->get_composite_drawable = gdk_drawable_real_get_composite_drawable;
/* Default implementation for clip and visible region is the same */
klass->get_clip_region = gdk_drawable_real_get_visible_region;
klass->get_visible_region = gdk_drawable_real_get_visible_region;
@@ -201,23 +193,6 @@ gdk_drawable_get_colormap (GdkDrawable *drawable)
return GDK_DRAWABLE_GET_CLASS (drawable)->get_colormap (drawable);
}
-static GdkDrawable *
-gdk_drawable_real_get_composite_drawable (GdkDrawable *drawable,
- gint x,
- gint y,
- gint width,
- gint height,
- gint *composite_x_offset,
- gint *composite_y_offset)
-{
- g_return_val_if_fail (GDK_IS_DRAWABLE (drawable), NULL);
-
- *composite_x_offset = 0;
- *composite_y_offset = 0;
-
- return g_object_ref (drawable);
-}
-
/**
* gdk_drawable_get_clip_region:
* @drawable: a #GdkDrawable
diff --git a/gdk/gdkdrawable.h b/gdk/gdkdrawable.h
index 8259385..266eaf8 100644
--- a/gdk/gdkdrawable.h
+++ b/gdk/gdkdrawable.h
@@ -76,14 +76,6 @@ struct _GdkDrawableClass
cairo_region_t* (*get_clip_region) (GdkDrawable *drawable);
cairo_region_t* (*get_visible_region) (GdkDrawable *drawable);
- GdkDrawable* (*get_composite_drawable) (GdkDrawable *drawable,
- gint x,
- gint y,
- gint width,
- gint height,
- gint *composite_x_offset,
- gint *composite_y_offset);
-
cairo_surface_t *(*ref_cairo_surface) (GdkDrawable *drawable);
GdkDrawable *(*get_source_drawable) (GdkDrawable *drawable);
diff --git a/gdk/gdkoffscreenwindow.c b/gdk/gdkoffscreenwindow.c
index 58829fd..d472c76 100644
--- a/gdk/gdkoffscreenwindow.c
+++ b/gdk/gdkoffscreenwindow.c
@@ -204,20 +204,6 @@ gdk_offscreen_window_get_source_drawable (GdkDrawable *drawable)
return _gdk_drawable_get_source_drawable (offscreen->pixmap);
}
-static GdkDrawable *
-gdk_offscreen_window_get_composite_drawable (GdkDrawable *drawable,
- gint x,
- gint y,
- gint width,
- gint height,
- gint *composite_x_offset,
- gint *composite_y_offset)
-{
- GdkOffscreenWindow *offscreen = GDK_OFFSCREEN_WINDOW (drawable);
-
- return g_object_ref (offscreen->pixmap);
-}
-
static GdkScreen*
gdk_offscreen_window_get_screen (GdkDrawable *drawable)
{
@@ -924,7 +910,6 @@ gdk_offscreen_window_class_init (GdkOffscreenWindowClass *klass)
drawable_class->get_screen = gdk_offscreen_window_get_screen;
drawable_class->get_visual = gdk_offscreen_window_get_visual;
drawable_class->get_source_drawable = gdk_offscreen_window_get_source_drawable;
- drawable_class->get_composite_drawable = gdk_offscreen_window_get_composite_drawable;
}
static void
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 17f7560..75c86d4 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -418,7 +418,6 @@ gdk_window_class_init (GdkWindowObjectClass *klass)
drawable_class->set_cairo_clip = gdk_window_set_cairo_clip;
drawable_class->get_clip_region = gdk_window_get_clip_region;
drawable_class->get_visible_region = gdk_window_get_visible_region;
- drawable_class->get_composite_drawable = gdk_window_get_composite_drawable;
drawable_class->get_source_drawable = gdk_window_get_source_drawable;
quark_pointer_window = g_quark_from_static_string ("gtk-pointer-window");
@@ -3850,141 +3849,6 @@ gdk_window_get_source_drawable (GdkDrawable *drawable)
return drawable;
}
-static GdkDrawable *
-gdk_window_get_composite_drawable (GdkDrawable *drawable,
- gint x,
- gint y,
- gint width,
- gint height,
- gint *composite_x_offset,
- gint *composite_y_offset)
-{
- GdkWindowObject *private = (GdkWindowObject *)drawable;
- GSList *list;
- GdkPixmap *tmp_pixmap;
- GdkRectangle rect;
- gboolean overlap_buffer;
- GdkDrawable *source;
- GdkWindowObject *impl_window;
- GdkWindowPaint *implicit_paint;
- cairo_t *cr;
-
- *composite_x_offset = -private->abs_x;
- *composite_y_offset = -private->abs_y;
-
- if ((GDK_IS_WINDOW (drawable) && GDK_WINDOW_DESTROYED (drawable)))
- return g_object_ref (_gdk_drawable_get_source_drawable (drawable));
-
- /* See if any buffered part is overlapping the part we want
- * to get
- */
- rect.x = x;
- rect.y = y;
- rect.width = width;
- rect.height = height;
-
- overlap_buffer = FALSE;
-
- for (list = private->paint_stack; list != NULL; list = list->next)
- {
- GdkWindowPaint *paint = list->data;
- cairo_region_overlap_t overlap;
-
- overlap = cairo_region_contains_rectangle (paint->region, &rect);
-
- if (overlap == CAIRO_REGION_OVERLAP_IN)
- {
- *composite_x_offset = paint->x_offset;
- *composite_y_offset = paint->y_offset;
-
- return g_object_ref (paint->pixmap);
- }
- else if (overlap == CAIRO_REGION_OVERLAP_PART)
- {
- overlap_buffer = TRUE;
- break;
- }
- }
-
- impl_window = gdk_window_get_impl_window (private);
- implicit_paint = impl_window->implicit_paint;
- if (implicit_paint)
- {
- cairo_region_overlap_t overlap;
-
- rect.x += private->abs_x;
- rect.y += private->abs_y;
-
- overlap = cairo_region_contains_rectangle (implicit_paint->region, &rect);
- if (overlap == CAIRO_REGION_OVERLAP_IN)
- {
- *composite_x_offset = -private->abs_x + implicit_paint->x_offset;
- *composite_y_offset = -private->abs_y + implicit_paint->y_offset;
-
- return g_object_ref (implicit_paint->pixmap);
- }
- else if (overlap == CAIRO_REGION_OVERLAP_PART)
- overlap_buffer = TRUE;
- }
-
- if (!overlap_buffer)
- return g_object_ref (_gdk_drawable_get_source_drawable (drawable));
-
- tmp_pixmap = gdk_pixmap_new (drawable, width, height, -1);
- cr = gdk_cairo_create (tmp_pixmap);
-
- source = _gdk_drawable_get_source_drawable (drawable);
-
- gdk_cairo_set_source_pixmap (cr, source,
- x - *composite_x_offset,
- y - *composite_y_offset);
- cairo_paint (cr);
-
- /* paint the backing stores */
- if (implicit_paint)
- {
- GdkWindowPaint *paint = list->data;
-
- cairo_save (cr);
-
- gdk_cairo_set_source_pixmap (cr, paint->pixmap,
- x - paint->x_offset,
- y - paint->y_offset);
- cairo_translate (cr, -x - paint->x_offset, -y - paint->y_offset);
- gdk_cairo_region (cr, paint->region);
- cairo_fill (cr);
-
- cairo_restore (cr);
- }
-
- for (list = private->paint_stack; list != NULL; list = list->next)
- {
- GdkWindowPaint *paint = list->data;
-
- if (paint->uses_implicit)
- continue; /* We already copied this above */
-
- cairo_save (cr);
-
- gdk_cairo_set_source_pixmap (cr, paint->pixmap,
- x - paint->x_offset,
- y - paint->y_offset);
- cairo_translate (cr, -x, -y);
- gdk_cairo_region (cr, paint->region);
- cairo_fill (cr);
-
- cairo_restore (cr);
- }
-
- cairo_destroy (cr);
-
- /* Set these to location of tmp_pixmap within the window */
- *composite_x_offset = x;
- *composite_y_offset = y;
-
- return tmp_pixmap;
-}
-
static cairo_region_t*
gdk_window_get_clip_region (GdkDrawable *drawable)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]