summaryrefslogtreecommitdiff
path: root/gdk/gdksurface.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2018-04-14 22:35:46 +0200
committerBenjamin Otte <otte@redhat.com>2018-04-24 23:16:12 +0200
commit54a83d0288715d41bb824c86709b6be04538ed28 (patch)
tree7a1558882fe3f3258dbd7e60e8ea4ca2ab8477f8 /gdk/gdksurface.c
parent7a6871ea5f6a1662df1fefba7ac038e20381f5b2 (diff)
downloadgtk+-54a83d0288715d41bb824c86709b6be04538ed28.tar.gz
surface: Fold function into only user
Diffstat (limited to 'gdk/gdksurface.c')
-rw-r--r--gdk/gdksurface.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c
index 08fd046125..274b492485 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -1731,18 +1731,6 @@ gdk_surface_get_drawing_context (GdkSurface *surface)
return surface->drawing_context;
}
-/* This returns either the current working surface on the paint stack
- * or the actual impl surface of the surface. This should not be used
- * from very many places: be careful! */
-static cairo_surface_t *
-ref_surface_surface (GdkSurface *surface)
-{
- if (surface->impl_surface->current_paint.surface)
- return cairo_surface_reference (surface->impl_surface->current_paint.surface);
- else
- return gdk_surface_ref_impl_surface (surface);
-}
-
/* This is used in places like gdk_cairo_set_source_surface and
* other places to take "screenshots" of surfaces. Thus, we allow
* it to be used outside of a begin_paint / end_paint. */
@@ -1753,7 +1741,13 @@ _gdk_surface_ref_cairo_surface (GdkSurface *surface)
g_return_val_if_fail (GDK_IS_SURFACE (surface), NULL);
- cairo_surface = ref_surface_surface (surface);
+ /* This returns either the current working surface on the paint stack
+ * or the actual impl surface of the surface. This should not be used
+ * from very many places: be careful! */
+ if (surface->impl_surface->current_paint.surface)
+ cairo_surface = cairo_surface_reference (surface->impl_surface->current_paint.surface);
+ else
+ cairo_surface = gdk_surface_ref_impl_surface (surface);
if (gdk_surface_has_impl (surface))
{