ooo-build r13707 - in trunk: . patches/dev300



Author: rodo
Date: Thu Aug 28 14:19:53 2008
New Revision: 13707
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13707&view=rev

Log:
2008-08-28  Radek Doulik  <rodo@>

	* patches/dev300/apply: added
	patches/dev300/transogl-fix-dual-head.diff, fixes some of issues
	on dual head slideshow.

	OGLTrans_TransitionerImpl.cxx: select right glx context in update
	and dispose, reference canvas bitmaps as we use pixmaps from them
	now



Added:
   trunk/patches/dev300/transogl-fix-dual-head.diff
Modified:
   trunk/ChangeLog
   trunk/patches/dev300/apply

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Thu Aug 28 14:19:53 2008
@@ -1791,6 +1791,7 @@
 transogl-detect-fix.diff
 transogl-buildfix.diff
 transogl-pixmap-to-texture.diff
+transogl-fix-dual-head.diff
 
 [ Experimental ]
 # sal_uInt32 -> sal_uIntPtr for events on some places

Added: trunk/patches/dev300/transogl-fix-dual-head.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/transogl-fix-dual-head.diff	Thu Aug 28 14:19:53 2008
@@ -0,0 +1,160 @@
+diff -rup slideshow/source/engine/OGLTrans-orig-1/OGLTrans_TransitionerImpl.cxx slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx
+--- slideshow/source/engine/OGLTrans-orig-1/OGLTrans_TransitionerImpl.cxx	2008-08-27 11:15:30.000000000 +0200
++++ slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx	2008-08-28 16:11:46.000000000 +0200
+@@ -172,8 +172,8 @@ protected:
+     void createTexture( unsigned int* texID,
+ #ifdef GLX_VERSION_1_3
+ 			unx::GLXPixmap pixmap,
+-#endif
+ 			bool usePixmap,
++#endif
+ 			bool useMipmap,
+ 			uno::Sequence<sal_Int8>& data,
+ 			const OGLFormat* pFormat );
+@@ -225,6 +225,9 @@ private:
+     /** pointer to our window which we MIGHT create.
+     */
+     class SystemChildWindow* pWindow;
++
++    Reference< rendering::XIntegerBitmap > mxLeavingBitmap;
++    Reference< rendering::XIntegerBitmap > mxEnteringBitmap;
+     
+     /** raw bytes of the entering bitmap
+     */
+@@ -238,6 +241,7 @@ private:
+     unx::GLXPixmap LeavingPixmap;
+     unx::GLXPixmap EnteringPixmap;
+ #endif
++    bool mbRestoreSync;
+     bool mbUseLeavingPixmap;
+     bool mbUseEnteringPixmap;
+     bool mbFreeLeavingPixmap;
+@@ -648,13 +652,13 @@ void OGLTransitionerImpl::setSlides( con
+     if (isDisposed())
+         return;
+         
+-    Reference< rendering::XIntegerBitmap > LeavingSlideIntBitmap( xLeavingSlide , UNO_QUERY_THROW );
+-    Reference< rendering::XIntegerBitmap > EnteringSlideIntBitmap( xEnteringSlide , UNO_QUERY_THROW );
++    mxLeavingBitmap.set( xLeavingSlide , UNO_QUERY_THROW );
++    mxEnteringBitmap.set( xEnteringSlide , UNO_QUERY_THROW );
+     Reference< XFastPropertySet > xLeavingSet( xLeavingSlide , UNO_QUERY );
+     Reference< XFastPropertySet > xEnteringSet( xEnteringSlide , UNO_QUERY );
+ 
+     geometry::IntegerRectangle2D SlideRect;
+-    SlideSize = LeavingSlideIntBitmap->getSize();
++    SlideSize = mxLeavingBitmap->getSize();
+     SlideRect.X1 = 0;
+     SlideRect.X2 = SlideSize.Width;
+     SlideRect.Y1 = 0;
+@@ -749,9 +753,9 @@ void OGLTransitionerImpl::setSlides( con
+ #endif
+ #endif
+     if( !mbUseLeavingPixmap )
+-	LeavingBytes = LeavingSlideIntBitmap->getData(SlideBitmapLayout,SlideRect);
++	LeavingBytes = mxLeavingBitmap->getData(SlideBitmapLayout,SlideRect);
+     if( !mbUseEnteringPixmap )
+-	EnteringBytes = EnteringSlideIntBitmap->getData(SlideBitmapLayout,SlideRect);
++	EnteringBytes = mxEnteringBitmap->getData(SlideBitmapLayout,SlideRect);
+ 
+ // TODO    
+ #ifdef UNX
+@@ -770,14 +774,15 @@ void OGLTransitionerImpl::setSlides( con
+     // I suspect some issues in above code in slideshow
+     // synchronize whole transition for now
+     XSynchronize( GLWin.dpy, true );
++    mbRestoreSync = true;
+ #endif
+ }
+ 
+ void OGLTransitionerImpl::createTexture( unsigned int* texID,
+ #ifdef GLX_VERSION_1_3
+ 					 unx::GLXPixmap pixmap,
+-#endif
+ 					 bool usePixmap,
++#endif
+ 					 bool useMipmap,
+ 					 uno::Sequence<sal_Int8>& data,
+ 					 const OGLFormat* pFormat )
+@@ -1010,8 +1015,8 @@ void OGLTransitionerImpl::GLInitSlides()
+     createTexture( &GLleavingSlide,
+ #ifdef GLX_VERSION_1_3
+ 		   LeavingPixmap,
+-#endif
+ 		   mbUseLeavingPixmap,
++#endif
+ 		   pTransition->mbUseMipMapLeaving,
+ 		   LeavingBytes,
+ 		   pFormat );
+@@ -1019,8 +1024,8 @@ void OGLTransitionerImpl::GLInitSlides()
+     createTexture( &GLenteringSlide,
+ #ifdef GLX_VERSION_1_3
+ 		   EnteringPixmap,
+-#endif
+ 		   mbUseEnteringPixmap,
++#endif
+ 		   pTransition->mbUseMipMapEntering,
+ 		   EnteringBytes,
+ 		   pFormat );
+@@ -1047,6 +1052,13 @@ void SAL_CALL OGLTransitionerImpl::updat
+     t3 = microsec_clock::local_time();
+ #endif
+ 
++#ifdef WNT
++    wglMakeCurrent(GLWin.hDC,GLWin.hRC);
++#endif
++#ifdef UNX
++    glXMakeCurrent( GLWin.dpy, GLWin.win, GLWin.ctx );
++#endif
++
+     glEnable(GL_DEPTH_TEST);
+     glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ 
+@@ -1083,6 +1095,15 @@ void OGLTransitionerImpl::disposing()
+ {
+     osl::MutexGuard const guard( m_aMutex );
+ 
++    OSL_TRACE("dispose %p\n", this);
++
++#ifdef WNT
++    wglMakeCurrent(GLWin.hDC,GLWin.hRC);
++#endif
++#ifdef UNX
++    glXMakeCurrent( GLWin.dpy, GLWin.win, GLWin.ctx );
++#endif
++
+ #ifdef GLX_VERSION_1_3
+     unx::PFNGLXRELEASETEXIMAGEEXTPROC myglXReleaseTexImageEXT = (unx::PFNGLXRELEASETEXIMAGEEXTPROC) unx::glXGetProcAddress( (const GLubyte*) "glXReleaseTexImageEXT" );
+     if( mbUseLeavingPixmap ) {
+@@ -1113,9 +1134,11 @@ void OGLTransitionerImpl::disposing()
+         pTransition->finish();
+ 
+ #ifdef UNX
+-    // try to reestablish synchronize state
+-    char* sal_synchronize = getenv("SAL_SYNCHRONIZE");
+-    XSynchronize( GLWin.dpy, sal_synchronize && *sal_synchronize == '1' );
++    if( mbRestoreSync ) {
++	// try to reestablish synchronize state
++	char* sal_synchronize = getenv("SAL_SYNCHRONIZE");
++	XSynchronize( GLWin.dpy, sal_synchronize && *sal_synchronize == '1' );
++    }
+ #endif
+ 
+ #if defined( WNT )
+@@ -1140,6 +1163,9 @@ void OGLTransitionerImpl::disposing()
+ 		delete pWindow;
+     if (pTransition)
+ 	delete pTransition;
++
++    mxLeavingBitmap.clear();
++    mxEnteringBitmap.clear();
+ }
+ 
+ OGLTransitionerImpl::OGLTransitionerImpl(OGLTransitionImpl* pOGLTransition) : 
+@@ -1150,6 +1176,7 @@ OGLTransitionerImpl::OGLTransitionerImpl
+     pWindow( NULL ), 
+     EnteringBytes(),
+     LeavingBytes(),
++    mbRestoreSync( false ),
+     mbUseLeavingPixmap( false ),
+     mbUseEnteringPixmap( false ),
+     SlideBitmapLayout(),



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