diff options
author | Benjamin Otte <otte@redhat.com> | 2018-04-14 02:29:23 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2018-04-24 23:16:13 +0200 |
commit | 03e6cefe73e4a3865a41e853f28e0e700d37a948 (patch) | |
tree | b611b3cadbc9ab2cbe761a09fb78515bff5f48e2 /gdk/x11/gdksurface-x11.c | |
parent | c48d78525e89089cbcb979ea66ccf731cd2aae28 (diff) | |
download | gtk+-03e6cefe73e4a3865a41e853f28e0e700d37a948.tar.gz |
x11: Move implementation of Cairo context backends
Also, don't implement SurfaceClass.ref_cairo_surface() anymore. This
means calls to it will crash now. But as they only happen in the generic
GdkCairoContext implementation, we shouldn't be affected by that.
Plus, once all backends have been ported, that call is going away
anyway.
Diffstat (limited to 'gdk/x11/gdksurface-x11.c')
-rw-r--r-- | gdk/x11/gdksurface-x11.c | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/gdk/x11/gdksurface-x11.c b/gdk/x11/gdksurface-x11.c index 387582f477..c55589c849 100644 --- a/gdk/x11/gdksurface-x11.c +++ b/gdk/x11/gdksurface-x11.c @@ -467,44 +467,6 @@ gdk_x11_surface_end_frame (GdkSurface *surface) * X11 specific implementations of generic functions * *****************************************************/ -static cairo_surface_t * -gdk_x11_create_cairo_surface (GdkSurfaceImplX11 *impl, - int width, - int height) -{ - Visual *visual; - - visual = gdk_x11_display_get_window_visual (GDK_X11_DISPLAY (gdk_surface_get_display (impl->wrapper))); - return cairo_xlib_surface_create (GDK_SURFACE_XDISPLAY (impl->wrapper), - GDK_SURFACE_IMPL_X11 (impl)->xid, - visual, - width, height); -} - -static cairo_surface_t * -gdk_x11_ref_cairo_surface (GdkSurface *surface) -{ - GdkSurfaceImplX11 *impl = GDK_SURFACE_IMPL_X11 (surface->impl); - - if (GDK_SURFACE_DESTROYED (surface)) - return NULL; - - if (!impl->cairo_surface) - { - impl->cairo_surface = gdk_x11_create_cairo_surface (impl, - gdk_surface_get_width (surface) * impl->surface_scale, - gdk_surface_get_height (surface) * impl->surface_scale); - cairo_surface_set_device_scale (impl->cairo_surface, impl->surface_scale, impl->surface_scale); - - if (SURFACE_IS_TOPLEVEL (surface) && impl->toplevel->in_frame) - hook_surface_changed (surface); - } - - cairo_surface_reference (impl->cairo_surface); - - return impl->cairo_surface; -} - static void gdk_surface_impl_x11_finalize (GObject *object) { @@ -4858,7 +4820,6 @@ gdk_surface_impl_x11_class_init (GdkSurfaceImplX11Class *klass) object_class->finalize = gdk_surface_impl_x11_finalize; - impl_class->ref_cairo_surface = gdk_x11_ref_cairo_surface; impl_class->show = gdk_surface_x11_show; impl_class->hide = gdk_surface_x11_hide; impl_class->withdraw = gdk_surface_x11_withdraw; |