diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-01-21 17:46:15 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-01-21 20:50:18 +0000 |
commit | 4f91e4f3f9e80b4b258f07d29cc2ea490d8e7417 (patch) | |
tree | d1b9705ad334b5f955937254db95d32ca0011eb1 /vcl/unx | |
parent | 3536fe8f4cdbacf5702e743407f34d918b6f4d38 (diff) |
gtk3: use gdk_window_create_similar_image_surface
maybe there is some small benefit to doing so, at least open us up
to that possibility
Change-Id: Ib1fcdf4a613c729b559bdbe653ed80e68bcb1ff3
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkframe.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index 803542d69cf0..738e06e9b098 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -1534,9 +1534,19 @@ void GtkSalFrame::AllocateFrame() if (m_pSurface) cairo_surface_destroy(m_pSurface); + + +#if GTK_CHECK_VERSION(3,10,0) + m_pSurface = gdk_window_create_similar_image_surface(widget_get_window(m_pWindow), + CAIRO_FORMAT_ARGB32, + aFrameSize.getX(), + aFrameSize.getY(), + 0); +#else m_pSurface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, - aFrameSize.getX(), - aFrameSize.getY()); + aFrameSize.getX(), + aFrameSize.getY()); +#endif cairo_surface_set_user_data(m_pSurface, SvpSalGraphics::getDamageKey(), &m_aDamageHandler, nullptr); SAL_INFO("vcl.gtk3", "allocated Frame size of " << maGeometry.nWidth << " x " << maGeometry.nHeight); |