diff options
author | Benjamin Otte <otte@redhat.com> | 2010-11-23 01:32:19 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-12-02 20:21:03 +0100 |
commit | 62d004cf8f0e431310c0ee551d203b1ba70d9dfe (patch) | |
tree | eada84067576ca65b64dc74c5f443dfb0af7b741 /gdk | |
parent | 9d2abf81d22208d1e6e202b9ff79183a98dffe7e (diff) | |
download | gtk+-62d004cf8f0e431310c0ee551d203b1ba70d9dfe.tar.gz |
gdk: Remove _gdk_drawable_ref_cairo_surface()
Instead, call the vfunc directly from gdkWindow.c
Diffstat (limited to 'gdk')
-rw-r--r-- | gdk/gdkdraw.c | 19 | ||||
-rw-r--r-- | gdk/gdkinternals.h | 2 | ||||
-rw-r--r-- | gdk/gdkwindow.c | 10 |
3 files changed, 8 insertions, 23 deletions
diff --git a/gdk/gdkdraw.c b/gdk/gdkdraw.c index a46a1d882b..56a4215047 100644 --- a/gdk/gdkdraw.c +++ b/gdk/gdkdraw.c @@ -50,22 +50,3 @@ gdk_drawable_init (GdkDrawable *drawable) { } -/** - * _gdk_drawable_ref_cairo_surface: - * @drawable: a #GdkDrawable - * - * Obtains a #cairo_surface_t for the given drawable. If a - * #cairo_surface_t for the drawable already exists, it will be - * referenced, otherwise a new surface will be created. - * - * Return value: a newly referenced #cairo_surface_t that points - * to @drawable. Unref with cairo_surface_destroy() - **/ -cairo_surface_t * -_gdk_drawable_ref_cairo_surface (GdkDrawable *drawable) -{ - g_return_val_if_fail (GDK_IS_DRAWABLE (drawable), NULL); - - return GDK_DRAWABLE_GET_CLASS (drawable)->ref_cairo_surface (drawable); -} - diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h index dd109d38f4..721e733b85 100644 --- a/gdk/gdkinternals.h +++ b/gdk/gdkinternals.h @@ -309,8 +309,6 @@ GdkDeviceManager * _gdk_device_manager_new (GdkDisplay *display); gboolean _gdk_cairo_surface_extents (cairo_surface_t *surface, GdkRectangle *extents); -cairo_surface_t *_gdk_drawable_ref_cairo_surface (GdkDrawable *drawable); - /************************************* * Interfaces used by windowing code * *************************************/ diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index 4dd371aa1d..15c864fdcc 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -2733,13 +2733,19 @@ gdk_window_begin_implicit_paint (GdkWindow *window, GdkRectangle *rect) return TRUE; } +static cairo_surface_t * +gdk_window_ref_impl_surface (GdkWindow *window) +{ + return GDK_DRAWABLE_GET_CLASS (window->impl)->ref_cairo_surface (window->impl); +} + static cairo_t * gdk_cairo_create_for_impl (GdkWindow *window) { cairo_surface_t *surface; cairo_t *cr; - surface = _gdk_drawable_ref_cairo_surface (window->impl); + surface = gdk_window_ref_impl_surface (window); cr = cairo_create (surface); cairo_surface_destroy (surface); @@ -3604,7 +3610,7 @@ gdk_window_create_cairo_surface (GdkWindow *window, { cairo_surface_t *surface, *subsurface; - surface = _gdk_drawable_ref_cairo_surface (window->impl); + surface = gdk_window_ref_impl_surface (window); if (gdk_window_has_impl (window)) return surface; |