summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@suse.com>2013-10-07 22:18:38 +0200
committerThorsten Behrens <thb@documentfoundation.org>2013-10-07 22:20:39 +0200
commit492c23afcc7137d93468af9b51537fda55ca6822 (patch)
tree338a6f0ca81a3c891c75ca26267bdae501aac110 /slideshow
parent81d657f351650b17b05704c65abc2863473761dc (diff)
Fix opengl transitions some more.
More fixup after a775188f6bbf3bbf8448b2b7398a1902908bb5e2 - shuffling use of framebuffer config array to a place where it's not yet free-ed again. Change-Id: Icc50d08e2d42e6fbdb46de668a98d31e364f0bdc
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx19
1 files changed, 4 insertions, 15 deletions
diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx
index 23c10a03a182..49ebe0be1891 100644
--- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx
+++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx
@@ -29,6 +29,7 @@
// Includes <GL/gl.h>
#include "OGLTrans_TransitionImpl.hxx"
+#include <string.h>
#include <sal/types.h>
#include <com/sun/star/beans/XFastPropertySet.hpp>
@@ -518,7 +519,7 @@ bool OGLTransitionerImpl::createWindow( Window* pPWindow )
#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
unx::GLXFBConfig* fbconfigs = NULL;
- int nfbconfigs, value, i = 0;
+ int nfbconfigs = 0, value = 0, i = 0;
#endif
while( *pAttributeTable )
@@ -576,6 +577,7 @@ bool OGLTransitionerImpl::createWindow( Window* pPWindow )
if( i != nfbconfigs ) {
vi = glXGetVisualFromFBConfig( GLWin.dpy, fbconfigs[i] );
+ GLWin.fbc = fbconfigs[i];
mbHasTFPVisual = true;
pChildSysData = lcl_createSystemWindow( vi, pPWindow, &pWindow );
SAL_INFO("slideshow.opengl", "found visual suitable for texture_from_pixmap");
@@ -624,10 +626,6 @@ bool OGLTransitionerImpl::createWindow( Window* pPWindow )
#elif defined( UNX )
GLWin.dpy = reinterpret_cast<unx::Display*>(pChildSysData->pDisplay);
GLWin.win = pChildSysData->aWindow;
-#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
- if( mbHasTFPVisual )
- GLWin.fbc = fbconfigs[i];
-#endif
GLWin.vi = vi;
GLWin.GLXExtensions = unx::glXQueryExtensionsString( GLWin.dpy, GLWin.screen );
SAL_INFO("slideshow.opengl", "available GLX extensions: " << GLWin.GLXExtensions);
@@ -1762,7 +1760,6 @@ void OGLTransitionerImpl::disposing()
OGLTransitionerImpl::OGLTransitionerImpl() :
OGLTransitionerImplBase(m_aMutex),
- GLWin(),
GLleavingSlide( 0 ),
GLenteringSlide( 0 ),
pWindow( NULL ),
@@ -1775,15 +1772,7 @@ OGLTransitionerImpl::OGLTransitionerImpl() :
SlideBitmapLayout(),
SlideSize()
{
-#if defined( _WIN32 )
- GLWin.hWnd = 0;
-#elif defined( UNX )
- GLWin.ctx = 0;
-#endif
-
-#if OSL_DEBUG_LEVEL > 1
- mnFrameCount = 0;
-#endif
+ memset(&GLWin, 0, sizeof(GLWin));
}
typedef cppu::WeakComponentImplHelper1<presentation::XTransitionFactory> OGLTransitionFactoryImplBase;