summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-06-23 20:33:18 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-06-24 21:12:30 +0100
commit253c0f073715b1d0f6ba063b1182016e45951bf4 (patch)
tree73a58acbf8f0363313bc97a86d455951fb43d86e /vcl/unx
parenta8be3fba0a8678392c9bef9a3a2ced3cedef36f0 (diff)
gtk3: move createCairoContext down to svpgdi
Change-Id: Ib3c6d6689c4b79a636a3f2f0f985f3573aa46f3d
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/gtk/window/gtksalframe.cxx13
1 files changed, 2 insertions, 11 deletions
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx
index 159771a9773d..88b0bd04568e 100644
--- a/vcl/unx/gtk/window/gtksalframe.cxx
+++ b/vcl/unx/gtk/window/gtksalframe.cxx
@@ -3465,17 +3465,8 @@ gboolean GtkSalFrame::signalCrossing( GtkWidget*, GdkEventCrossing* pEvent, gpoi
cairo_t* GtkSalFrame::getCairoContext() const
{
- basebmp::RawMemorySharedArray data = m_aFrame->getBuffer();
- basegfx::B2IVector size = m_aFrame->getSize();
- sal_Int32 nStride = m_aFrame->getScanlineStride();
- assert(cairo_format_stride_for_width(CAIRO_FORMAT_RGB24, size.getX()) == nStride);
- cairo_surface_t *target =
- cairo_image_surface_create_for_data(data.get(),
- CAIRO_FORMAT_RGB24,
- size.getX(), size.getY(),
- nStride);
- cairo_t* cr = cairo_create(target);
- cairo_surface_destroy(target);
+ cairo_t* cr = SvpSalGraphics::createCairoContext(m_aFrame);
+ assert(cr);
return cr;
}