ooo-build r12042 - in branches/sled-10-sp1-ooo-build-2-4: . patches/src680



Author: rodo
Date: Fri Mar 28 15:21:35 2008
New Revision: 12042
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12042&view=rev

Log:
2008-03-28  Radek Doulik  <rodo novell com>

	* patches/src680/apply: added transogl-dispose-fix.diff with
	changes described below
	
	* build/ooh680-m12/slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx:
	unset current context before destroying it, we were doing that
	only when build with debug. call also disposing in initialization
	before deleting the transitioner instance. disable mipmaps on Mesa
	as valgrind shows invalid read in gluBuild2DMipmaps


Added:
   branches/sled-10-sp1-ooo-build-2-4/patches/src680/transogl-dispose-fix.diff
Modified:
   branches/sled-10-sp1-ooo-build-2-4/ChangeLog
   branches/sled-10-sp1-ooo-build-2-4/patches/src680/apply

Modified: branches/sled-10-sp1-ooo-build-2-4/patches/src680/apply
==============================================================================
--- branches/sled-10-sp1-ooo-build-2-4/patches/src680/apply	(original)
+++ branches/sled-10-sp1-ooo-build-2-4/patches/src680/apply	Fri Mar 28 15:21:35 2008
@@ -1638,6 +1638,7 @@
 transogl-shader-transitions.diff
 transogl-mesa-fallback.diff
 transogl-shader-transitions-1.diff
+transogl-dispose-fix.diff
 
 [ Experimental ]
 # sal_uInt32 -> sal_uIntPtr for events on some places

Added: branches/sled-10-sp1-ooo-build-2-4/patches/src680/transogl-dispose-fix.diff
==============================================================================
--- (empty file)
+++ branches/sled-10-sp1-ooo-build-2-4/patches/src680/transogl-dispose-fix.diff	Fri Mar 28 15:21:35 2008
@@ -0,0 +1,61 @@
+diff -rup slideshow/source/engine/OGLTrans-orig/OGLTrans_TransitionerImpl.cxx slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx
+--- slideshow/source/engine/OGLTrans-orig/OGLTrans_TransitionerImpl.cxx	2008-03-28 10:20:31.000000000 +0100
++++ slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx	2008-03-28 11:00:45.000000000 +0100
+@@ -209,6 +209,7 @@ void OGLTransitionerImpl::initialize( co
+         /* TODO: check for version once the bug in fglrx driver is fixed */
+         cbBrokenTexturesATI = (strcmp( (const char *) glGetString( GL_VENDOR ), "ATI Technologies Inc." ) == 0 );
+ 
++        instance->disposing();
+         delete instance;
+         initialized = true;
+     }
+@@ -343,6 +344,10 @@ bool OGLTransitionerImpl::initWindowFrom
+         return false;
+     }
+     glXMakeCurrent( GLWin.dpy, GLWin.win, GLWin.ctx );
++    if( glGetError() != GL_NO_ERROR ) {
++        OSL_TRACE("glError: %s\n", (char *)gluErrorString(glGetError()));
++        return false;
++    }
+ 
+     glEnable(GL_CULL_FACE);
+     glCullFace(GL_BACK);
+@@ -489,7 +494,7 @@ void OGLTransitionerImpl::GLInitSlides()
+     
+     glGenTextures(1, &GLleavingSlide);
+ 	glBindTexture(GL_TEXTURE_2D, GLleavingSlide);
+-    if( pTransition && !cbBrokenTexturesATI && !pTransition->mbUseMipMapLeaving) {
++    if( ( pTransition && !pTransition->mbUseMipMapLeaving ) || cbBrokenTexturesATI || cbMesa ) {
+         glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, SlideSize.Width, SlideSize.Height, 0, Format, GL_UNSIGNED_BYTE, &LeavingBytes[0]);
+         glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_REPEAT);
+         glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_REPEAT);
+@@ -513,7 +518,7 @@ void OGLTransitionerImpl::GLInitSlides()
+ 	
+ 	glGenTextures(1, &GLenteringSlide);
+ 	glBindTexture(GL_TEXTURE_2D, GLenteringSlide);
+-    if( pTransition && !cbBrokenTexturesATI && !pTransition->mbUseMipMapEntering ) {
++    if( ( pTransition && !pTransition->mbUseMipMapLeaving ) || cbBrokenTexturesATI || cbMesa ) {
+         glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, SlideSize.Width, SlideSize.Height, 0, Format, GL_UNSIGNED_BYTE, &EnteringBytes[0]);
+         glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_REPEAT);
+         glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_REPEAT);
+@@ -566,7 +571,10 @@ void OGLTransitionerImpl::disposing()
+ 
+     if(GLWin.ctx)
+ 	{
+-	    OSL_ENSURE( glXMakeCurrent(GLWin.dpy, None, NULL) , "Error releasing glX context" );
++        glXMakeCurrent(GLWin.dpy, None, NULL);
++        if( glGetError() != GL_NO_ERROR ) {
++            OSL_TRACE("glError: %s\n", (char *)gluErrorString(glGetError()));
++        }
+ 		glXDestroyContext(GLWin.dpy, GLWin.ctx);
+ 		GLWin.ctx = NULL;
+ 	}
+@@ -650,7 +658,7 @@ public:
+             return uno::Reference< presentation::XTransition >();
+             
+ 
+-        OGLTransitionImpl* pTransition;
++        OGLTransitionImpl* pTransition = NULL;
+ 
+         if( transitionType == animations::TransitionType::MISCSHAPEWIPE ) {
+             pTransition = new OGLTransitionImpl();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]