ooo-build r11684 - in trunk: . patches/src680



Author: rodo
Date: Fri Feb 22 16:49:50 2008
New Revision: 11684
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11684&view=rev

Log:
2008-02-22  Radek Doulik  <rodo novell com>

        * patches/src680/apply: added transogl-vsync.diff and
	sd-slideshow-slideshowview-transformation-fix.diff with changes
	mentioned below
	
	*
	build/ooh680-m7/slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx:
	check for GLX_SGI_swap_control extension and if present set swap
	interval to 1 so that buffers are swapped at most once per frame period

	* build/ooh680-m7/sd/source/ui/slideshow/slideshowviewimpl.cxx
	(getTransformation): decrease the width and height after the
	aspect ratio was corrected. result of irc disscussion with
	Thorsten



Added:
   trunk/patches/src680/sd-slideshow-slideshowview-transformation-fix.diff
   trunk/patches/src680/transogl-vsync.diff
Modified:
   trunk/ChangeLog
   trunk/patches/src680/apply

Modified: trunk/patches/src680/apply
==============================================================================
--- trunk/patches/src680/apply	(original)
+++ trunk/patches/src680/apply	Fri Feb 22 16:49:50 2008
@@ -1744,6 +1744,7 @@
 transogl-transitions-officecfg.diff
 transogl-transitions-scp2.diff
 transogl-more-transitions.diff
+transogl-vsync.diff
 
 [ Experimental ]
 # sal_uInt32 -> sal_uIntPtr for events on some places
@@ -2232,3 +2233,4 @@
 
 [ Fixes ]
 fix-ppt-linespacing-import-export.diff, n#355302, rodo
+sd-slideshow-slideshowview-transformation-fix.diff

Added: trunk/patches/src680/sd-slideshow-slideshowview-transformation-fix.diff
==============================================================================
--- (empty file)
+++ trunk/patches/src680/sd-slideshow-slideshowview-transformation-fix.diff	Fri Feb 22 16:49:50 2008
@@ -0,0 +1,31 @@
+diff -rup sd/source/ui/slideshow-orig/slideshowviewimpl.cxx sd/source/ui/slideshow/slideshowviewimpl.cxx
+--- sd/source/ui/slideshow-orig/slideshowviewimpl.cxx	2008-02-22 15:31:52.000000000 +0100
++++ sd/source/ui/slideshow/slideshowviewimpl.cxx	2008-02-22 15:31:26.000000000 +0100
+@@ -368,13 +368,7 @@ geometry::AffineMatrix2D SAL_CALL SlideS
+     ::osl::MutexGuard aGuard( m_aMutex );
+ 	::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ 
+-	const Size& rTmpSize( mrOutputWindow.GetSizePixel() );
+-    
+-    // Reduce available width by one, as the slides might actually
+-    // render one pixel wider and higher as aPageSize below specifies
+-    // (when shapes of page size have visible border lines)
+-	const Size  aWindowSize( rTmpSize.Width()-1, 
+-                             rTmpSize.Height()-1 );
++	const Size aWindowSize( mrOutputWindow.GetSizePixel() );
+     Size aOutputSize( aWindowSize );
+ 
+ 	if( meAnimationMode != ANIMATIONMODE_SHOW )
+@@ -401,6 +395,12 @@ geometry::AffineMatrix2D SAL_CALL SlideS
+ 	Point aOutputOffset( ( aWindowSize.Width() - aOutputSize.Width() ) >> 1,
+ 							( aWindowSize.Height() - aOutputSize.Height() ) >> 1 );
+ 
++    // Reduce available width by one, as the slides might actually
++    // render one pixel wider and higher as aPageSize below specifies
++    // (when shapes of page size have visible border lines)
++    aOutputSize.Width() --;
++    aOutputSize.Height() --;
++    
+     ::basegfx::B2DHomMatrix aMatrix;
+ 
+ 	maPresentationArea = Rectangle( aOutputOffset, aOutputSize );

Added: trunk/patches/src680/transogl-vsync.diff
==============================================================================
--- (empty file)
+++ trunk/patches/src680/transogl-vsync.diff	Fri Feb 22 16:49:50 2008
@@ -0,0 +1,66 @@
+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-02-22 16:17:57.000000000 +0100
++++ slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx	2008-02-22 17:33:19.000000000 +0100
+@@ -33,6 +33,7 @@
+  *
+  ************************************************************************/
+ 
++#define GLX_GLXEXT_PROTOTYPES 1
+ #include "OGLTrans_TransitionImpl.hxx"
+ 
+ #include <com/sun/star/rendering/IntegerBitmapLayout.hpp>
+@@ -67,6 +68,7 @@ namespace unx
+ {
+ #include <X11/keysym.h>
+ #include <GL/glx.h>
++#include <GL/glxext.h>
+ }
+ 
+ using namespace ::com::sun::star;
+@@ -114,6 +116,9 @@ private:    
+     	unsigned int			bpp;
+     	unsigned int            Width;
+     	unsigned int            Height;
++        const char*             GLXExtensions;
++
++        bool HasGLXExtension( const char* name ) { return gluCheckExtension( (const GLubyte*) name, (const GLubyte*) GLXExtensions ); };
+     } GLWin;
+     
+     /** OpenGL handle to the leaving slide's texture
+@@ -256,8 +261,7 @@ void OGLTransitionerImpl::initWindowFrom
+ 
+     if( pWindow )
+     {
+-        OSL_TRACE("OGLTrans: using VisualID %08X\n",
+-                  vi->visualid);
++        OSL_TRACE("OGLTrans: using VisualID %08X\n", vi->visualid);
+ 
+         pWindow->SetMouseTransparent( TRUE );
+         pWindow->SetParentClipMode( PARENTCLIPMODE_NOCLIP );
+@@ -269,6 +273,8 @@ void OGLTransitionerImpl::initWindowFrom
+ 
+         GLWin.dpy = reinterpret_cast<unx::Display*>(pChildSysData->pDisplay);
+         GLWin.win = pChildSysData->aWindow;
++        GLWin.GLXExtensions = unx::glXQueryExtensionsString( GLWin.dpy, GLWin.screen );
++        OSL_TRACE("available GLX extensions: %s", GLWin.GLXExtensions);
+     }
+ 
+     GLWin.ctx = glXCreateContext(GLWin.dpy,
+@@ -277,6 +283,16 @@ void OGLTransitionerImpl::initWindowFrom
+                                  GL_TRUE);
+     glXMakeCurrent( GLWin.dpy, GLWin.win, GLWin.ctx );
+ 
++    if(GLWin.HasGLXExtension("GLX_SGI_swap_control")) {
++        // enable vsync
++        typedef GLint (*glXSwapIntervalProc)(GLint);
++        glXSwapIntervalProc glXSwapInterval = (glXSwapIntervalProc) unx::glXGetProcAddress( (const GLubyte*) "glXSwapIntervalSGI" );
++        if( glXSwapInterval ) {
++            glXSwapInterval( 1 );
++            OSL_TRACE("set swap interval to 1 (enable vsync)");
++        }
++    }
++
+     /* TODO: check for version once the bug in fglrx driver is fixed */
+     bBrokenTexturesATI = (strcmp( (const char *) glGetString( GL_VENDOR ), "ATI Technologies Inc." ) == 0 );
+ 
+Only in slideshow/source/engine/OGLTrans: OGLTrans_TransitionerImpl.o



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