ooo-build r12076 - trunk/patches/src680
- From: rodo svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r12076 - trunk/patches/src680
- Date: Tue, 1 Apr 2008 15:49:39 +0100 (BST)
Author: rodo
Date: Tue Apr 1 15:49:39 2008
New Revision: 12076
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12076&view=rev
Log:
fixed broken diff
Modified:
trunk/patches/src680/transogl-detect-fix.diff
Modified: trunk/patches/src680/transogl-detect-fix.diff
==============================================================================
--- trunk/patches/src680/transogl-detect-fix.diff (original)
+++ trunk/patches/src680/transogl-detect-fix.diff Tue Apr 1 15:49:39 2008
@@ -1,6 +1,6 @@
-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-04-01 15:02:39.000000000 +0200
-+++ slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx 2008-04-01 15:55:15.000000000 +0200
+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-04-01 16:42:51.000000000 +0200
++++ slideshow/source/engine/OGLTrans/OGLTrans_TransitionerImpl.cxx 2008-04-01 16:44:55.000000000 +0200
@@ -88,7 +88,7 @@ public:
explicit OGLTransitionerImpl(OGLTransitionImpl* pOGLTransition);
bool initWindowFromSlideShowView( const uno::Reference< presentation::XSlideShowView >& xView, double, double);
@@ -10,48 +10,34 @@
// XTransition
virtual SAL_CALL void update( double nTime ) throw (uno::RuntimeException);
-@@ -165,6 +165,8 @@ public:
+@@ -165,14 +165,20 @@ public:
/** Whether Mesa is the OpenGL vendor
*/
static bool cbMesa;
+
++ /**
++ whether the display has GLX extension
++ */
+ static bool cbGLXPresent;
};
// declare the static variables as some gcc versions have problems declaring them automaticaly
-@@ -172,7 +174,7 @@ bool OGLTransitionerImpl::cbBrokenTextur
+ bool OGLTransitionerImpl::cbBrokenTexturesATI;
float OGLTransitionerImpl::cnGLVersion;
bool OGLTransitionerImpl::cbMesa;
++bool OGLTransitionerImpl::cbGLXPresent;
-void OGLTransitionerImpl::initialize( const uno::Reference< presentation::XSlideShowView >& xView )
+bool OGLTransitionerImpl::initialize( const uno::Reference< presentation::XSlideShowView >& xView )
{
// not thread safe
static bool initialized = false;
-@@ -181,37 +183,41 @@ void OGLTransitionerImpl::initialize( co
+@@ -181,28 +187,34 @@ void OGLTransitionerImpl::initialize( co
OGLTransitionerImpl *instance;
instance = new OGLTransitionerImpl( NULL );
- instance->initWindowFromSlideShowView( xView, 0, 0 );
--
-- if( instance->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)");
+ if( instance->initWindowFromSlideShowView( xView, 0, 0 ) ) {
-+ if( instance->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)");
-+ }
- }
-- }
- const GLubyte* version = glGetString( GL_VERSION );
- if( version && version[0] ) {
@@ -61,10 +47,6 @@
- } else
- cnGLVersion = 1.0;
- OSL_TRACE("GL version: %s parsed: %f", version, cnGLVersion );
--
-- const GLubyte* vendor = glGetString( GL_VENDOR );
-- cbMesa = ( vendor && strstr( (const char *) vendor, "Mesa" ) );
-- OSL_TRACE("GL vendor: %s identified as Mesa: %d", vendor, cbMesa );
+ const GLubyte* version = glGetString( GL_VERSION );
+ if( version && version[0] ) {
+ cnGLVersion = version[0] - '0';
@@ -78,13 +60,20 @@
+ cbMesa = ( vendor && strstr( (const char *) vendor, "Mesa" ) );
+ OSL_TRACE("GL vendor: %s identified as Mesa: %d", vendor, cbMesa );
- /* TODO: check for version once the bug in fglrx driver is fixed */
-- cbBrokenTexturesATI = (strcmp( (const char *) glGetString( GL_VENDOR ), "ATI Technologies Inc." ) == 0 );
+- const GLubyte* vendor = glGetString( GL_VENDOR );
+- cbMesa = ( vendor && strstr( (const char *) vendor, "Mesa" ) );
+- OSL_TRACE("GL vendor: %s identified as Mesa: %d", vendor, cbMesa );
++ /* TODO: check for version once the bug in fglrx driver is fixed */
+ cbBrokenTexturesATI = (vendor && strcmp( (const char *) vendor, "ATI Technologies Inc." ) == 0 );
+
+- /* 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();
+ cbGLXPresent = true;
+ } else
+ cbGLXPresent = false;
+- instance->disposing();
delete instance;
initialized = true;
}
@@ -93,7 +82,7 @@
}
bool OGLTransitionerImpl::initWindowFromSlideShowView( const uno::Reference< presentation::XSlideShowView >& xView, double, double)
-@@ -235,6 +241,10 @@ bool OGLTransitionerImpl::initWindowFrom
+@@ -226,6 +238,10 @@ bool OGLTransitionerImpl::initWindowFrom
const SystemEnvData* sysData(pPWindow->GetSystemData());
GLWin.dpy = reinterpret_cast<unx::Display*>(sysData->pDisplay);
@@ -104,7 +93,7 @@
GLWin.win = sysData->aWindow;
GLWin.screen = unx::XDefaultScreen(GLWin.dpy);
unx::XVisualInfo* vi( NULL );
-@@ -538,7 +548,7 @@ void SAL_CALL OGLTransitionerImpl::updat
+@@ -543,7 +559,7 @@ void SAL_CALL OGLTransitionerImpl::updat
{
osl::MutexGuard const guard( m_aMutex );
@@ -113,7 +102,7 @@
return;
glEnable(GL_DEPTH_TEST);
-@@ -642,7 +652,7 @@ public:
+@@ -654,7 +670,7 @@ public:
if( !hasTransition( transitionType, transitionSubType ) )
return uno::Reference< presentation::XTransition >();
@@ -122,7 +111,7 @@
if( OGLTransitionerImpl::cbMesa && (
( transitionType == animations::TransitionType::FADE && transitionSubType == animations::TransitionSubType::CROSSFADE ) ||
-@@ -709,9 +719,11 @@ public:
+@@ -721,9 +737,11 @@ public:
rtl::Reference<OGLTransitionerImpl> xRes(
new OGLTransitionerImpl(pTransition) );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]