[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - vcl/opengl
Michael Meeks
michael.meeks at collabora.com
Thu Dec 17 01:18:16 PST 2015
vcl/opengl/gdiimpl.cxx | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
New commits:
commit 2a46bd51fe94c19ab29cfd27ab75c80ac89a5737
Author: Michael Meeks <michael.meeks at 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/20750
Reviewed-by: Tor Lillqvist <tml at collabora.com>
Tested-by: Tor Lillqvist <tml at collabora.com>
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index f106872..ba480f2 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() );
More information about the Libreoffice-commits
mailing list