diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h index 9c3b9994fe..d2fce09cf1 100644 --- a/gdk/gdkinternals.h +++ b/gdk/gdkinternals.h @@ -509,9 +509,6 @@ gboolean _gdk_windowing_set_cairo_surface_size (cairo_surface_t *surface, int width, int height); -cairo_surface_t * _gdk_windowing_create_cairo_surface (GdkDrawable *drawable, - int width, - int height); GdkWindow * _gdk_window_find_child_at (GdkWindow *window, int x, int y); GdkWindow * _gdk_window_find_descendant_at (GdkWindow *toplevel, diff --git a/gdk/gdkpixmap.c b/gdk/gdkpixmap.c index c8849e9d89..2c42162e5f 100644 --- a/gdk/gdkpixmap.c +++ b/gdk/gdkpixmap.c @@ -185,8 +185,8 @@ gdk_pixmap_create_cairo_surface (GdkDrawable *drawable, int width, int height) { - return _gdk_windowing_create_cairo_surface (GDK_PIXMAP_OBJECT(drawable)->impl, - width, height); + return _gdk_drawable_create_cairo_surface (GDK_PIXMAP_OBJECT(drawable)->impl, + width, height); } static GdkScreen* diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index 6315697b57..1b49d9ae19 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -3817,8 +3817,7 @@ gdk_window_create_cairo_surface (GdkDrawable *drawable, int width, int height) { - return _gdk_windowing_create_cairo_surface (GDK_WINDOW_OBJECT(drawable)->impl, - width, height); + return _gdk_drawable_ref_cairo_surface (GDK_WINDOW_OBJECT(drawable)->impl); } diff --git a/gdk/quartz/gdkdrawable-quartz.c b/gdk/quartz/gdkdrawable-quartz.c index 849d186ac9..ea8736a401 100644 --- a/gdk/quartz/gdkdrawable-quartz.c +++ b/gdk/quartz/gdkdrawable-quartz.c @@ -55,10 +55,10 @@ gdk_quartz_cairo_surface_destroy (void *data) g_free (surface_data); } -cairo_surface_t * -_gdk_windowing_create_cairo_surface (GdkDrawable *drawable, - int width, - int height) +static cairo_surface_t * +gdk_quartz_create_cairo_surface (GdkDrawable *drawable, + int width, + int height) { CGContextRef cg_context; GdkQuartzCairoSurfaceData *surface_data; @@ -97,8 +97,8 @@ gdk_quartz_ref_cairo_surface (GdkDrawable *drawable) int width, height; gdk_drawable_get_size (drawable, &width, &height); - impl->cairo_surface = _gdk_windowing_create_cairo_surface (drawable, - width, height); + impl->cairo_surface = gdk_quartz_create_cairo_surface (drawable, + width, height); } else cairo_surface_reference (impl->cairo_surface); @@ -170,6 +170,7 @@ gdk_drawable_impl_quartz_class_init (GdkDrawableImplQuartzClass *klass) object_class->finalize = gdk_drawable_impl_quartz_finalize; drawable_class->ref_cairo_surface = gdk_quartz_ref_cairo_surface; + drawable_class->create_cairo_surface = gdk_quartz_create_cairo_surface; drawable_class->set_colormap = gdk_quartz_set_colormap; drawable_class->get_colormap = gdk_quartz_get_colormap; diff --git a/gdk/win32/gdkdrawable-win32.c b/gdk/win32/gdkdrawable-win32.c index 7fd01d8434..13fca73c8c 100644 --- a/gdk/win32/gdkdrawable-win32.c +++ b/gdk/win32/gdkdrawable-win32.c @@ -49,6 +49,9 @@ (gcwin32->line_style == GDK_LINE_ON_OFF_DASH && gcwin32->pen_dash_offset)) static cairo_surface_t *gdk_win32_ref_cairo_surface (GdkDrawable *drawable); +static cairo_surface_t *gdk_win32_create_cairo_surface (GdkDrawable *drawable, + int width, + int height); static void gdk_win32_set_colormap (GdkDrawable *drawable, GdkColormap *colormap); @@ -77,6 +80,7 @@ _gdk_drawable_impl_win32_class_init (GdkDrawableImplWin32Class *klass) object_class->finalize = gdk_drawable_impl_win32_finalize; drawable_class->ref_cairo_surface = gdk_win32_ref_cairo_surface; + drawable_class->create_cairo_surface = gdk_win32_create_cairo_surface; drawable_class->set_colormap = gdk_win32_set_colormap; drawable_class->get_colormap = gdk_win32_get_colormap; @@ -222,10 +226,10 @@ _gdk_win32_drawable_release_dc (GdkDrawable *drawable) } } -cairo_surface_t * -_gdk_windowing_create_cairo_surface (GdkDrawable *drawable, - gint width, - gint height) +static cairo_surface_t * +gdk_win32_create_cairo_surface (GdkDrawable *drawable, + gint width, + gint height) { /* width and height are determined from the DC */ return gdk_win32_ref_cairo_surface (drawable); diff --git a/gdk/x11/gdkdrawable-x11.c b/gdk/x11/gdkdrawable-x11.c index 961dad01ab..8d92429bce 100644 --- a/gdk/x11/gdkdrawable-x11.c +++ b/gdk/x11/gdkdrawable-x11.c @@ -49,6 +49,9 @@ static cairo_surface_t *gdk_x11_ref_cairo_surface (GdkDrawable *drawable); +static cairo_surface_t *gdk_x11_create_cairo_surface (GdkDrawable *drawable, + int width, + int height); static void gdk_x11_set_colormap (GdkDrawable *drawable, GdkColormap *colormap); @@ -73,6 +76,7 @@ _gdk_drawable_impl_x11_class_init (GdkDrawableImplX11Class *klass) object_class->finalize = gdk_drawable_impl_x11_finalize; drawable_class->ref_cairo_surface = gdk_x11_ref_cairo_surface; + drawable_class->create_cairo_surface = gdk_x11_create_cairo_surface; drawable_class->set_colormap = gdk_x11_set_colormap; drawable_class->get_colormap = gdk_x11_get_colormap; @@ -470,10 +474,10 @@ _gdk_windowing_set_cairo_surface_size (cairo_surface_t *surface, return TRUE; } -cairo_surface_t * -_gdk_windowing_create_cairo_surface (GdkDrawable *drawable, - int width, - int height) +static cairo_surface_t * +gdk_x11_create_cairo_surface (GdkDrawable *drawable, + int width, + int height) { GdkDrawableImplX11 *impl = GDK_DRAWABLE_IMPL_X11 (drawable); GdkVisual *visual; @@ -516,7 +520,7 @@ gdk_x11_ref_cairo_surface (GdkDrawable *drawable) gdk_drawable_get_size (impl->wrapper, &width, &height); - impl->cairo_surface = _gdk_windowing_create_cairo_surface (drawable, width, height); + impl->cairo_surface = gdk_x11_create_cairo_surface (drawable, width, height); if (impl->cairo_surface) cairo_surface_set_user_data (impl->cairo_surface, &gdk_x11_cairo_key,