From e66076c33b5875e68167b53fd9d663f4abd566c8 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Wed, 23 Dec 2015 13:37:33 +0000 Subject: tdf#96690 - don't copy tiny non-rendered-to virtual devices. Change-Id: Ic9d90bb7f652599b5a6ce303aa026b7e4e255324 Reviewed-on: https://gerrit.libreoffice.org/21091 Tested-by: Jenkins Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist --- vcl/opengl/gdiimpl.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index 73a2c82913bb..c236125b482c 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -1649,6 +1649,13 @@ void OpenGLSalGraphicsImpl::DoCopyBits( const SalTwoRect& rPosAry, OpenGLSalGrap { VCL_GL_INFO( "::copyBits" ); + if( !rImpl.maOffscreenTex ) + { + VCL_GL_INFO( "::copyBits - skipping copy of un-initialized framebuffer contents of size " + << rImpl.GetWidth() << "x" << rImpl.GetHeight() ); + return; + } + if( &rImpl == this && (rPosAry.mnSrcWidth == rPosAry.mnDestWidth) && (rPosAry.mnSrcHeight == rPosAry.mnDestHeight)) -- cgit v1.2.3