[Libreoffice-commits] core.git: Branch 'feature/chart-opengl' - chart2/source

Markus Mohrhard markus.mohrhard at googlemail.com
Wed Dec 18 11:05:26 PST 2013


 chart2/source/view/main/OpenGLRender.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 1a799cbf6075dd4bf6b75751619c2c21b784f5cf
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Wed Dec 18 20:04:34 2013 +0100

    fix crash when creating bitmaps
    
    Change-Id: I72982abcfcb0edff35a7000944146e8d924c120f

diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx
index 7ae8fd3..ffe7293 100644
--- a/chart2/source/view/main/OpenGLRender.cxx
+++ b/chart2/source/view/main/OpenGLRender.cxx
@@ -651,10 +651,10 @@ int OpenGLRender::RenderLine2FBO(int wholeFlag)
     boost::scoped_array<sal_uInt8> buf(new sal_uInt8[m_iWidth * m_iHeight * 4]);
     glReadPixels(0, 0, m_iWidth, m_iHeight, GL_BGR, GL_UNSIGNED_BYTE, buf.get());
     BitmapEx aBmp;
-    aBmp.SetSizePixel(Size(m_iWidth, m_iHeight));
+    aBmp.Expand(m_iWidth, m_iHeight);
 
-    Bitmap aBitmap( aBmp.GetBitmap() );
-    Bitmap aAlpha( aBmp.GetAlpha().GetBitmap() );
+    Bitmap aBitmap( Size( m_iWidth, m_iHeight ), 24 );
+    Bitmap aAlpha( Size( m_iWidth, m_iHeight ), 24 );
 
     Bitmap::ScopedWriteAccess pWriteAccess( aBitmap );
     Bitmap::ScopedWriteAccess pAlphaWriteAccess( aAlpha );


More information about the Libreoffice-commits mailing list