diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-12-16 17:19:31 +0000 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2015-12-17 09:17:44 +0000 |
commit | 2a46bd51fe94c19ab29cfd27ab75c80ac89a5737 (patch) | |
tree | 25af8dcda7da61731ad2d0e9ca8d0f67e07b4875 | |
parent | b676e97dd30272171dc07c8e5ddc3e562f5ebb1a (diff) |
tdf#96546 - Bitmap getTexture calls can crash too - enter GL zone earlier.
Change-Id: Idd095e0a3b5e5226eaf1db90bfb0a838bc51de19
Reviewed-on: https://gerrit.libreoffice.org/20750
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
-rw-r--r-- | vcl/opengl/gdiimpl.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index f1068721a887..ba480f2102e8 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -1651,6 +1651,8 @@ void OpenGLSalGraphicsImpl::drawBitmap( const SalTwoRect& rPosAry, const SalBitm // check that carefully only in the debug mode assert(dynamic_cast<const OpenGLSalBitmap*>(&rSalBitmap)); + OpenGLZone aZone; + const OpenGLSalBitmap& rBitmap = static_cast<const OpenGLSalBitmap&>(rSalBitmap); OpenGLTexture& rTexture = rBitmap.GetTexture(); @@ -1665,6 +1667,8 @@ void OpenGLSalGraphicsImpl::drawBitmap( const SalBitmap& rSalBitmap, const SalBitmap& rMaskBitmap ) { + OpenGLZone aZone; + const OpenGLSalBitmap& rBitmap = static_cast<const OpenGLSalBitmap&>(rSalBitmap); const OpenGLSalBitmap& rMask = static_cast<const OpenGLSalBitmap&>(rMaskBitmap); OpenGLTexture& rTexture( rBitmap.GetTexture() ); @@ -1681,6 +1685,8 @@ void OpenGLSalGraphicsImpl::drawMask( const SalBitmap& rSalBitmap, SalColor nMaskColor ) { + OpenGLZone aZone; + const OpenGLSalBitmap& rBitmap = static_cast<const OpenGLSalBitmap&>(rSalBitmap); OpenGLTexture& rTexture( rBitmap.GetTexture() ); @@ -1692,6 +1698,8 @@ void OpenGLSalGraphicsImpl::drawMask( SalBitmap* OpenGLSalGraphicsImpl::getBitmap( long nX, long nY, long nWidth, long nHeight ) { + OpenGLZone aZone; + OpenGLSalBitmap* pBitmap = new OpenGLSalBitmap; VCL_GL_INFO( "::getBitmap " << nX << "," << nY << " " << nWidth << "x" << nHeight ); @@ -1782,6 +1790,8 @@ bool OpenGLSalGraphicsImpl::blendBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap ) { + OpenGLZone aZone; + const OpenGLSalBitmap& rBitmap = static_cast<const OpenGLSalBitmap&>(rSalBitmap); OpenGLTexture& rTexture( rBitmap.GetTexture() ); @@ -1804,6 +1814,8 @@ bool OpenGLSalGraphicsImpl::blendAlphaBitmap( const SalBitmap& rSalMaskBitmap, const SalBitmap& rSalAlphaBitmap ) { + OpenGLZone aZone; + const OpenGLSalBitmap& rSrcBitmap = static_cast<const OpenGLSalBitmap&>(rSalSrcBitmap); const OpenGLSalBitmap& rMaskBitmap = static_cast<const OpenGLSalBitmap&>(rSalMaskBitmap); const OpenGLSalBitmap& rAlphaBitmap = static_cast<const OpenGLSalBitmap&>(rSalAlphaBitmap); @@ -1835,6 +1847,8 @@ bool OpenGLSalGraphicsImpl::drawAlphaBitmap( const SalBitmap& rSalBitmap, const SalBitmap& rAlphaBitmap ) { + OpenGLZone aZone; + const OpenGLSalBitmap& rBitmap = static_cast<const OpenGLSalBitmap&>(rSalBitmap); const OpenGLSalBitmap& rAlpha = static_cast<const OpenGLSalBitmap&>(rAlphaBitmap); OpenGLTexture& rTexture( rBitmap.GetTexture() ); @@ -1855,6 +1869,8 @@ bool OpenGLSalGraphicsImpl::drawTransformedBitmap( const SalBitmap& rSrcBitmap, const SalBitmap* pAlphaBitmap) { + OpenGLZone aZone; + const OpenGLSalBitmap& rBitmap = static_cast<const OpenGLSalBitmap&>(rSrcBitmap); const OpenGLSalBitmap* pMaskBitmap = static_cast<const OpenGLSalBitmap*>(pAlphaBitmap); OpenGLTexture& rTexture( rBitmap.GetTexture() ); |