vcl/opengl/gdiimpl.cxx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
New commits: commit 70bfd5d747ad24fcd70eab93fb5e27faafdd35fe Author: Michael Meeks <michael.me...@collabora.com> Date: Wed Dec 16 17:19:31 2015 +0000 tdf#96546 - Bitmap getTexture calls can crash too - enter GL zone earlier. Change-Id: Idd095e0a3b5e5226eaf1db90bfb0a838bc51de19 Reviewed-on: https://gerrit.libreoffice.org/20741 Reviewed-by: Michael Meeks <michael.me...@collabora.com> Tested-by: Michael Meeks <michael.me...@collabora.com> diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index fe5c475..860cdbc 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(); @@ -1668,6 +1670,8 @@ void OpenGLSalGraphicsImpl::drawBitmap( assert(dynamic_cast<const OpenGLSalBitmap*>(&rSalBitmap)); assert(dynamic_cast<const OpenGLSalBitmap*>(&rMaskBitmap)); + OpenGLZone aZone; + const OpenGLSalBitmap& rBitmap = static_cast<const OpenGLSalBitmap&>(rSalBitmap); const OpenGLSalBitmap& rMask = static_cast<const OpenGLSalBitmap&>(rMaskBitmap); OpenGLTexture& rTexture( rBitmap.GetTexture() ); @@ -1685,6 +1689,9 @@ void OpenGLSalGraphicsImpl::drawMask( SalColor nMaskColor ) { assert(dynamic_cast<const OpenGLSalBitmap*>(&rSalBitmap)); + + OpenGLZone aZone; + const OpenGLSalBitmap& rBitmap = static_cast<const OpenGLSalBitmap&>(rSalBitmap); OpenGLTexture& rTexture( rBitmap.GetTexture() ); @@ -1696,6 +1703,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 ); @@ -1788,6 +1797,8 @@ bool OpenGLSalGraphicsImpl::blendBitmap( { assert(dynamic_cast<const OpenGLSalBitmap*>(&rSalBitmap)); + OpenGLZone aZone; + const OpenGLSalBitmap& rBitmap = static_cast<const OpenGLSalBitmap&>(rSalBitmap); OpenGLTexture& rTexture( rBitmap.GetTexture() ); @@ -1814,6 +1825,8 @@ bool OpenGLSalGraphicsImpl::blendAlphaBitmap( assert(dynamic_cast<const OpenGLSalBitmap*>(&rSalMaskBitmap)); assert(dynamic_cast<const OpenGLSalBitmap*>(&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); @@ -1848,6 +1861,8 @@ bool OpenGLSalGraphicsImpl::drawAlphaBitmap( assert(dynamic_cast<const OpenGLSalBitmap*>(&rSalBitmap)); assert(dynamic_cast<const OpenGLSalBitmap*>(&rAlphaBitmap)); + OpenGLZone aZone; + const OpenGLSalBitmap& rBitmap = static_cast<const OpenGLSalBitmap&>(rSalBitmap); const OpenGLSalBitmap& rAlpha = static_cast<const OpenGLSalBitmap&>(rAlphaBitmap); OpenGLTexture& rTexture( rBitmap.GetTexture() ); @@ -1871,6 +1886,8 @@ bool OpenGLSalGraphicsImpl::drawTransformedBitmap( assert(dynamic_cast<const OpenGLSalBitmap*>(&rSrcBitmap)); assert(dynamic_cast<const OpenGLSalBitmap*>(pAlphaBitmap)); + OpenGLZone aZone; + const OpenGLSalBitmap& rBitmap = static_cast<const OpenGLSalBitmap&>(rSrcBitmap); const OpenGLSalBitmap* pMaskBitmap = static_cast<const OpenGLSalBitmap*>(pAlphaBitmap); OpenGLTexture& rTexture( rBitmap.GetTexture() ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits