[Libreoffice-commits] .: 6 commits - drawinglayer/source Makefile.top slideshow/source
David Tardon
dtardon at kemper.freedesktop.org
Fri Aug 17 05:43:33 PDT 2012
Makefile.top | 6
drawinglayer/source/primitive2d/baseprimitive2d.cxx | 31 -
slideshow/source/engine/OGLTrans/unx/OGLTrans_Shaders.cxx | 12
slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionImpl.cxx | 22 -
slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionerImpl.cxx | 214 +++++-----
slideshow/source/engine/transitions/slidetransitionfactory.cxx | 15
6 files changed, 152 insertions(+), 148 deletions(-)
New commits:
commit 76367894c0a33bac0404733b8eae936d93d03381
Author: David Tardon <dtardon at redhat.com>
Date: Fri Aug 17 14:12:16 2012 +0200
switch logging from OSL_ to SAL_
Change-Id: Iad5041fe85c5f03b9b5ed4a13d5c59c4ac027386
diff --git a/slideshow/source/engine/OGLTrans/unx/OGLTrans_Shaders.cxx b/slideshow/source/engine/OGLTrans/unx/OGLTrans_Shaders.cxx
index c1beae1..e7e6424 100644
--- a/slideshow/source/engine/OGLTrans/unx/OGLTrans_Shaders.cxx
+++ b/slideshow/source/engine/OGLTrans/unx/OGLTrans_Shaders.cxx
@@ -99,7 +99,7 @@ GLuint OGLShaders::LinkProgram( const char *vertexShader, const char *fragmentSh
vertexObject = glCreateShader( GL_VERTEX_SHADER );
fragmentObject = glCreateShader( GL_FRAGMENT_SHADER );
- OSL_TRACE("checkpoint 1: shaders created (%d) vertex: %d fragment: %d", glGetError() == GL_NO_ERROR, vertexObject, fragmentObject );
+ SAL_INFO("slideshow.opengl", "checkpoint 1: shaders created (" << (glGetError() == GL_NO_ERROR) << ") vertex: " << vertexObject << " fragment: " << fragmentObject);
glShaderSource( vertexObject, 1, &vertexShader, NULL );
@@ -107,17 +107,17 @@ GLuint OGLShaders::LinkProgram( const char *vertexShader, const char *fragmentSh
glCompileShader( vertexObject );
glGetShaderInfoLog( vertexObject, sizeof( log ), NULL, log );
- OSL_TRACE("vertex compile log: %s", log);
+ SAL_INFO("slideshow.opengl", "vertex compile log: " << log);
glGetShaderiv( vertexObject, GL_COMPILE_STATUS, &vertexCompiled );
glCompileShader( fragmentObject );
glGetShaderInfoLog( fragmentObject, sizeof( log ), NULL, log );
- OSL_TRACE("fragment compile log: %s", log);
+ SAL_INFO("slideshow.opengl", "fragment compile log: " << log);
glGetShaderiv( fragmentObject, GL_COMPILE_STATUS, &fragmentCompiled );
if( !vertexCompiled || !fragmentCompiled )
return 0;
- OSL_TRACE("checkpoint 2: shaders compiled (%d)", glGetError() == GL_NO_ERROR);
+ SAL_INFO("slideshow.opengl", "checkpoint 2: shaders compiled (" << (glGetError() == GL_NO_ERROR) << ')');
programObject = glCreateProgram();
glAttachShader( programObject, vertexObject );
@@ -125,13 +125,13 @@ GLuint OGLShaders::LinkProgram( const char *vertexShader, const char *fragmentSh
glLinkProgram( programObject );
glGetProgramInfoLog( programObject, sizeof( log ), NULL, log );
- OSL_TRACE("program link log: %s", log);
+ SAL_INFO("slideshow.opengl", "program link log: " << log);
glGetProgramiv( programObject, GL_LINK_STATUS, &programLinked );
if( !programLinked )
return 0;
- OSL_TRACE("checkpoint 3: program linked (%d)", glGetError() == GL_NO_ERROR);
+ SAL_INFO("slideshow.opengl", "checkpoint 3: program linked (" << (glGetError() == GL_NO_ERROR) << ')');
return programObject;
#else
diff --git a/slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionerImpl.cxx b/slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionerImpl.cxx
index 9dbb9b6..2c9bd5e 100644
--- a/slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionerImpl.cxx
+++ b/slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionerImpl.cxx
@@ -78,16 +78,13 @@ namespace unx
#endif
#include <vcl/sysdata.hxx>
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
#include <boost/date_time/posix_time/posix_time.hpp>
using namespace ::boost::posix_time;
static ptime t1;
static ptime t2;
-#define DBG(x) x
-#else
-#define DBG(x)
#endif
using namespace ::com::sun::star;
@@ -313,7 +310,7 @@ public:
*/
bool mbHasTFPVisual;
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
ptime t3;
ptime t4;
ptime t5;
@@ -347,11 +344,11 @@ bool OGLTransitionerImpl::initialize( const Reference< presentation::XSlideShowV
cnGLVersion += (version[2] - '0')/10.0;
} else
cnGLVersion = 1.0;
- OSL_TRACE("GL version: %s parsed: %f", version, cnGLVersion );
+ SAL_INFO("slideshow.opengl", "GL version: " << version << " parsed: " << 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 );
+ SAL_INFO("slideshow.opengl", "GL vendor: " << vendor << " identified as Mesa: " << cbMesa << "" );
/* TODO: check for version once the bug in fglrx driver is fixed */
cbBrokenTexturesATI = (vendor && strcmp( (const char *) vendor, "ATI Technologies Inc." ) == 0 );
@@ -381,7 +378,7 @@ bool OGLTransitionerImpl::createWindow( Window* pPWindow )
GLWin.win = sysData->aWindow;
- OSL_TRACE("parent window: %d", GLWin.win);
+ SAL_INFO("slideshow.opengl", "parent window: " << GLWin.win);
unx::XWindowAttributes xattr;
unx::XGetWindowAttributes( GLWin.dpy, GLWin.win, &xattr );
@@ -462,7 +459,7 @@ bool OGLTransitionerImpl::createWindow( Window* pPWindow )
if( vi ) {
if( !firstVisual )
firstVisual = vi;
- OSL_TRACE("trying VisualID %08X", vi->visualid);
+ SAL_INFO("slideshow.opengl", "trying VisualID " << vi->visualid);
fbconfigs = glXGetFBConfigs (GLWin.dpy, GLWin.screen, &nfbconfigs);
for ( ; i < nfbconfigs; i++)
{
@@ -500,18 +497,18 @@ bool OGLTransitionerImpl::createWindow( Window* pPWindow )
if( i != nfbconfigs ) {
vi = glXGetVisualFromFBConfig( GLWin.dpy, fbconfigs[i] );
mbHasTFPVisual = true;
- OSL_TRACE("found visual suitable for texture_from_pixmap");
+ SAL_INFO("slideshow.opengl", "found visual suitable for texture_from_pixmap");
} else {
vi = firstVisual;
mbHasTFPVisual = false;
- OSL_TRACE("did not find visual suitable for texture_from_pixmap, using %08X", vi->visualid);
+ SAL_INFO("slideshow.opengl", "did not find visual suitable for texture_from_pixmap, using " << vi->visualid);
}
#else
if( vi ) {
#endif
SystemWindowData winData;
winData.nSize = sizeof(winData);
- OSL_TRACE("using VisualID %08X", vi->visualid);
+ SAL_INFO("slideshow.opengl", "using VisualID " << vi->visualid);
winData.pVisual = (void*)(vi->visual);
pWindow=new SystemChildWindow(pPWindow, 0, &winData, sal_False);
pChildSysData = pWindow->GetSystemData();
@@ -555,7 +552,7 @@ bool OGLTransitionerImpl::createWindow( Window* pPWindow )
#endif
GLWin.vi = vi;
GLWin.GLXExtensions = unx::glXQueryExtensionsString( GLWin.dpy, GLWin.screen );
- OSL_TRACE("available GLX extensions: %s", GLWin.GLXExtensions);
+ SAL_INFO("slideshow.opengl", "available GLX extensions: " << GLWin.GLXExtensions);
#endif
return true;
@@ -592,7 +589,7 @@ bool OGLTransitionerImpl::initWindowFromSlideShowView( const Reference< presenta
pWindow->SetPosSizePixel(aCanvasArea.X, aCanvasArea.Y, aCanvasArea.Width, aCanvasArea.Height);
GLWin.Width = aCanvasArea.Width;
GLWin.Height = aCanvasArea.Height;
- OSL_TRACE("canvas area: %d,%d - %dx%d", aCanvasArea.X, aCanvasArea.Y, aCanvasArea.Width, aCanvasArea.Height);
+ SAL_INFO("slideshow.opengl", "canvas area: " << aCanvasArea.X << "," << aCanvasArea.Y << " - " << aCanvasArea.Width << "x" << aCanvasArea.Height);
#if defined( WNT )
GLWin.hDC = GetDC(GLWin.hWnd);
@@ -602,7 +599,7 @@ bool OGLTransitionerImpl::initWindowFromSlideShowView( const Reference< presenta
0,
GL_TRUE);
if( GLWin.ctx == NULL ) {
- OSL_TRACE("unable to create GLX context");
+ SAL_INFO("slideshow.opengl", "unable to create GLX context");
return false;
}
#endif
@@ -635,7 +632,7 @@ bool OGLTransitionerImpl::initWindowFromSlideShowView( const Reference< presenta
wglMakeCurrent(GLWin.hDC,GLWin.hRC);
#elif defined( UNX )
if( !glXMakeCurrent( GLWin.dpy, GLWin.win, GLWin.ctx ) ) {
- OSL_TRACE("unable to select current GLX context");
+ SAL_INFO("slideshow.opengl", "unable to select current GLX context");
return false;
}
@@ -643,10 +640,10 @@ bool OGLTransitionerImpl::initWindowFromSlideShowView( const Reference< presenta
mnGLXVersion = 0;
if( glXQueryVersion( GLWin.dpy, &glxMajor, &glxMinor ) )
mnGLXVersion = glxMajor + 0.1*glxMinor;
- OSL_TRACE("available GLX version: %f", mnGLXVersion);
+ SAL_INFO("slideshow.opengl", "available GLX version: " << mnGLXVersion);
GLWin.GLExtensions = glGetString( GL_EXTENSIONS );
- OSL_TRACE("available GL extensions: %s", GLWin.GLExtensions);
+ SAL_INFO("slideshow.opengl", "available GL extensions: " << GLWin.GLExtensions);
mbTextureFromPixmap = GLWin.HasGLXExtension( "GLX_EXT_texture_from_pixmap" );
mbGenerateMipmap = GLWin.HasGLExtension( "GL_SGIS_generate_mipmap" );
@@ -670,9 +667,9 @@ bool OGLTransitionerImpl::initWindowFromSlideShowView( const Reference< presenta
XSync(GLWin.dpy, false);
if( errorTriggered )
- OSL_TRACE("error when trying to set swap interval, NVIDIA or Mesa bug?");
+ SAL_INFO("slideshow.opengl", "error when trying to set swap interval, NVIDIA or Mesa bug?");
else
- OSL_TRACE("set swap interval to 1 (enable vsync)");
+ SAL_INFO("slideshow.opengl", "set swap interval to 1 (enable vsync)");
// restore the error handler
unx::XSetErrorHandler( oldHandler );
@@ -727,16 +724,16 @@ void OGLTransitionerImpl::setSlides( const uno::Reference< rendering::XBitmap >&
SlideRect.Y1 = 0;
SlideRect.Y2 = SlideSize.Height;
- OSL_TRACE("leaving bitmap area: %dx%d", SlideSize.Width, SlideSize.Height);
+ SAL_INFO("slideshow.opengl", "leaving bitmap area: " << SlideSize.Width << "x" << SlideSize.Height);
SlideSize = mxEnteringBitmap->getSize();
- OSL_TRACE("entering bitmap area: %dx%d", SlideSize.Width, SlideSize.Height);
+ SAL_INFO("slideshow.opengl", "entering bitmap area: " << SlideSize.Width << "x" << SlideSize.Height);
#ifdef UNX
unx::glXWaitGL();
XSync(GLWin.dpy, false);
#endif
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
t1 = microsec_clock::local_time();
#endif
@@ -751,7 +748,7 @@ void OGLTransitionerImpl::setSlides( const uno::Reference< rendering::XBitmap >&
Sequence< Any > enterArgs;
if( (xLeavingSet->getFastPropertyValue( 1 ) >>= leaveArgs) &&
(xEnteringSet->getFastPropertyValue( 1 ) >>= enterArgs) ) {
- OSL_TRACE ("pixmaps available");
+ SAL_INFO("slideshow.opengl", "pixmaps available");
sal_Int32 depth(0);
@@ -787,6 +784,7 @@ void OGLTransitionerImpl::setSlides( const uno::Reference< rendering::XBitmap >&
if( !errorTriggered )
mbUseLeavingPixmap = true;
else {
+ SAL_INFO("slideshow.opengl", "XError triggered");
OSL_TRACE("XError triggered");
if( mbFreeLeavingPixmap ) {
unx::XFreePixmap( GLWin.dpy, maLeavingPixmap );
@@ -801,11 +799,11 @@ void OGLTransitionerImpl::setSlides( const uno::Reference< rendering::XBitmap >&
unx::glXWaitGL();
XSync(GLWin.dpy, false);
- OSL_TRACE("created glx pixmap %p and %p depth: %d", LeavingPixmap, EnteringPixmap, depth);
+ SAL_INFO("slideshow.opengl", "created glx pixmap " << LeavingPixmap << " and " << EnteringPixmap << " depth: " << depth);
if( !errorTriggered )
mbUseEnteringPixmap = true;
else {
- OSL_TRACE("XError triggered");
+ SAL_INFO("slideshow.opengl", "XError triggered");
if( mbFreeEnteringPixmap ) {
unx::XFreePixmap( GLWin.dpy, maEnteringPixmap );
mbFreeEnteringPixmap = false;
@@ -868,7 +866,7 @@ void OGLTransitionerImpl::createTexture( unsigned int* texID,
glTexParameteri( GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, True);
myglXBindTexImageEXT (GLWin.dpy, pixmap, GLX_FRONT_LEFT_EXT, NULL);
if( mbGenerateMipmap && useMipmap ) {
- OSL_TRACE("use mipmaps");
+ SAL_INFO("slideshow.opengl", "use mipmaps");
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_LINEAR); //TRILINEAR FILTERING
} else {
@@ -1102,15 +1100,15 @@ void OGLTransitionerImpl::GLInitSlides()
XSync(GLWin.dpy, false);
#endif
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
t2 = microsec_clock::local_time();
- OSL_TRACE("textures created in: %s", to_simple_string( t2 - t1 ).c_str());
+ SAL_INFO("slideshow.opengl", "textures created in: " << ( t2 - t1 ));
#endif
}
void SAL_CALL OGLTransitionerImpl::update( double nTime ) throw (uno::RuntimeException)
{
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
frame_count ++;
t3 = microsec_clock::local_time();
if( frame_count == 1 ) {
@@ -1153,11 +1151,11 @@ void SAL_CALL OGLTransitionerImpl::update( double nTime ) throw (uno::RuntimeExc
XSync( GLWin.dpy, false );
#endif
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
t4 = microsec_clock::local_time();
- OSL_TRACE("update time: %f", nTime);
- OSL_TRACE("update took: %s", to_simple_string( t4 - t3 ).c_str());
+ SAL_INFO("slideshow.opengl", "update time: " << nTime);
+ SAL_INFO("slideshow.opengl", "update took: " << ( t4 - t3 ));
total_update += (t4 - t3);
#endif
}
@@ -1167,7 +1165,7 @@ void SAL_CALL OGLTransitionerImpl::viewChanged( const Reference< presentation::X
const Reference< rendering::XBitmap >& rEnteringBitmap )
throw (uno::RuntimeException)
{
- OSL_TRACE("transitioner: view changed");
+ SAL_INFO("slideshow.opengl", "transitioner: view changed");
disposeTextures();
disposeContextAndWindow();
@@ -1190,7 +1188,7 @@ void OGLTransitionerImpl::disposeContextAndWindow()
{
glXMakeCurrent(GLWin.dpy, None, NULL);
if( glGetError() != GL_NO_ERROR ) {
- OSL_TRACE("glError: %s", (char *)gluErrorString(glGetError()));
+ SAL_INFO("slideshow.opengl", "glError: " << (char *)gluErrorString(glGetError()));
}
glXDestroyContext(GLWin.dpy, GLWin.ctx);
GLWin.ctx = NULL;
@@ -1255,16 +1253,20 @@ void OGLTransitionerImpl::disposing()
{
osl::MutexGuard const guard( m_aMutex );
-#ifdef DEBUG
- OSL_TRACE("dispose %p", this);
+#if OSL_DEBUG_LEVEL > 1
+ SAL_INFO("slideshow.opengl", "dispose " << this);
if( frame_count ) {
t6 = microsec_clock::local_time();
time_duration duration = t6 - t5;
- OSL_TRACE("whole transition (frames: %d) took: %s fps: %f time spent in updates: %s percentage of transition time: %f%%",
- frame_count, to_simple_string( duration ).c_str(),
- ((double)frame_count*1000000000.0)/duration.total_nanoseconds(),
- to_simple_string( total_update ).c_str(),
- 100*(((double)total_update.total_nanoseconds())/((double)duration.total_nanoseconds()))
+ SAL_INFO("slideshow.opengl",
+ "whole transition (frames: " << frame_count
+ << ") took: " << duration
+ << " fps: "
+ << (((double)frame_count*1000000000.0)/duration.total_nanoseconds())
+ << " time spent in updates: " << total_update
+ << " percentage of transition time: "
+ << (100*(((double)total_update.total_nanoseconds())/((double)duration.total_nanoseconds())))
+ << '%'
);
}
#endif
@@ -1317,7 +1319,9 @@ OGLTransitionerImpl::OGLTransitionerImpl(OGLTransitionImpl* pOGLTransition) :
GLWin.ctx = 0;
#endif
- DBG(frame_count = 0);
+#if OSL_DEBUG_LEVEL > 1
+ frame_count = 0;
+#endif
}
typedef cppu::WeakComponentImplHelper1<presentation::XTransitionFactory> OGLTransitionFactoryImplBase;
commit 67955bfb2ae92baf39dd3c1488aed20bb975b97f
Author: David Tardon <dtardon at redhat.com>
Date: Fri Aug 17 13:14:58 2012 +0200
fix indentation
Change-Id: I9b077cbbeac37c0eaac1365a8793cbc3f33f8b3e
diff --git a/slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionImpl.cxx b/slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionImpl.cxx
index 88e2056..5bbedb6 100644
--- a/slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionImpl.cxx
+++ b/slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionImpl.cxx
@@ -180,11 +180,11 @@ void OGLTransitionImpl::displaySlide( double nTime, ::sal_Int32 glSlideTex, std:
glTranslated( 0, 2 - surfaceLevel, 0 );
glCullFace(GL_FRONT);
- for(unsigned int i(0); i < primitives.size(); ++i)
- primitives[i].display(nTime, SlideWidthScale, SlideHeightScale);
+ for(unsigned int i(0); i < primitives.size(); ++i)
+ primitives[i].display(nTime, SlideWidthScale, SlideHeightScale);
glCullFace(GL_BACK);
- slideShadow( nTime, primitives[0], SlideWidthScale, SlideHeightScale );
+ slideShadow( nTime, primitives[0], SlideWidthScale, SlideHeightScale );
glPopMatrix();
}
@@ -464,11 +464,11 @@ void OGLTransitionImpl::displaySlidesRochade( double nTime, ::sal_Int32 glLeavin
glEnable(GL_TEXTURE_2D);
if( nTime > .5) {
- displaySlide( nTime, glLeavingSlideTex, maLeavingSlidePrimitives, SlideWidthScale, SlideHeightScale );
- displaySlide( nTime, glEnteringSlideTex, maEnteringSlidePrimitives, SlideWidthScale, SlideHeightScale );
+ displaySlide( nTime, glLeavingSlideTex, maLeavingSlidePrimitives, SlideWidthScale, SlideHeightScale );
+ displaySlide( nTime, glEnteringSlideTex, maEnteringSlidePrimitives, SlideWidthScale, SlideHeightScale );
} else {
- displaySlide( nTime, glEnteringSlideTex, maEnteringSlidePrimitives, SlideWidthScale, SlideHeightScale );
- displaySlide( nTime, glLeavingSlideTex, maLeavingSlidePrimitives, SlideWidthScale, SlideHeightScale );
+ displaySlide( nTime, glEnteringSlideTex, maEnteringSlidePrimitives, SlideWidthScale, SlideHeightScale );
+ displaySlide( nTime, glLeavingSlideTex, maLeavingSlidePrimitives, SlideWidthScale, SlideHeightScale );
}
}
@@ -1044,11 +1044,11 @@ void OGLTransitionImpl::displaySlidesFadeThroughBlack( double nTime, ::sal_Int32
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
if( nTime < 0.5 ) {
- glColor4f( 1, 1, 1, 1 - nTime*2 );
- displaySlide( nTime, glLeavingSlideTex, maLeavingSlidePrimitives, SlideWidthScale, SlideHeightScale );
+ glColor4f( 1, 1, 1, 1 - nTime*2 );
+ displaySlide( nTime, glLeavingSlideTex, maLeavingSlidePrimitives, SlideWidthScale, SlideHeightScale );
} else {
- glColor4f( 1, 1, 1, (nTime - 0.5)*2 );
- displaySlide( nTime, glEnteringSlideTex, maEnteringSlidePrimitives, SlideWidthScale, SlideHeightScale );
+ glColor4f( 1, 1, 1, (nTime - 0.5)*2 );
+ displaySlide( nTime, glEnteringSlideTex, maEnteringSlidePrimitives, SlideWidthScale, SlideHeightScale );
}
glDisable(GL_BLEND);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
diff --git a/slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionerImpl.cxx b/slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionerImpl.cxx
index b82f41c..9dbb9b6 100644
--- a/slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionerImpl.cxx
+++ b/slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionerImpl.cxx
@@ -747,82 +747,82 @@ void OGLTransitionerImpl::setSlides( const uno::Reference< rendering::XBitmap >&
#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
if( mnGLXVersion >= 1.2999 && mbTextureFromPixmap && xLeavingSet.is() && xEnteringSet.is() && mbHasTFPVisual ) {
- Sequence< Any > leaveArgs;
- Sequence< Any > enterArgs;
- if( (xLeavingSet->getFastPropertyValue( 1 ) >>= leaveArgs) &&
- (xEnteringSet->getFastPropertyValue( 1 ) >>= enterArgs) ) {
- OSL_TRACE ("pixmaps available");
-
- sal_Int32 depth(0);
-
- leaveArgs[0] >>= mbFreeLeavingPixmap;
- enterArgs[0] >>= mbFreeEnteringPixmap;
- leaveArgs[1] >>= maLeavingPixmap;
- enterArgs[1] >>= maEnteringPixmap;
- leaveArgs[2] >>= depth;
-
- int pixmapAttribs[] = { GLX_TEXTURE_TARGET_EXT, GLX_TEXTURE_2D_EXT,
- GLX_TEXTURE_FORMAT_EXT, GLX_TEXTURE_FORMAT_RGB_EXT,
- GLX_MIPMAP_TEXTURE_EXT, True,
- None };
-
-
- // sync so that we possibly get an pending XError, before we set our handler.
- // this way we will not miss any error from other code
- unx::glXWaitGL();
- XSync(GLWin.dpy, false);
-
- int (*oldHandler)(unx::Display* /*dpy*/, unx::XErrorEvent* /*evnt*/);
-
- // replace error handler temporarily
- oldHandler = unx::XSetErrorHandler( oglErrorHandler );
-
- errorTriggered = false;
- LeavingPixmap = glXCreatePixmap( GLWin.dpy, GLWin.fbc, maLeavingPixmap, pixmapAttribs );
-
- // sync so that we possibly get an XError
- unx::glXWaitGL();
- XSync(GLWin.dpy, false);
+ Sequence< Any > leaveArgs;
+ Sequence< Any > enterArgs;
+ if( (xLeavingSet->getFastPropertyValue( 1 ) >>= leaveArgs) &&
+ (xEnteringSet->getFastPropertyValue( 1 ) >>= enterArgs) ) {
+ OSL_TRACE ("pixmaps available");
+
+ sal_Int32 depth(0);
+
+ leaveArgs[0] >>= mbFreeLeavingPixmap;
+ enterArgs[0] >>= mbFreeEnteringPixmap;
+ leaveArgs[1] >>= maLeavingPixmap;
+ enterArgs[1] >>= maEnteringPixmap;
+ leaveArgs[2] >>= depth;
+
+ int pixmapAttribs[] = { GLX_TEXTURE_TARGET_EXT, GLX_TEXTURE_2D_EXT,
+ GLX_TEXTURE_FORMAT_EXT, GLX_TEXTURE_FORMAT_RGB_EXT,
+ GLX_MIPMAP_TEXTURE_EXT, True,
+ None };
+
+
+ // sync so that we possibly get an pending XError, before we set our handler.
+ // this way we will not miss any error from other code
+ unx::glXWaitGL();
+ XSync(GLWin.dpy, false);
+
+ int (*oldHandler)(unx::Display* /*dpy*/, unx::XErrorEvent* /*evnt*/);
+
+ // replace error handler temporarily
+ oldHandler = unx::XSetErrorHandler( oglErrorHandler );
+
+ errorTriggered = false;
+ LeavingPixmap = glXCreatePixmap( GLWin.dpy, GLWin.fbc, maLeavingPixmap, pixmapAttribs );
+
+ // sync so that we possibly get an XError
+ unx::glXWaitGL();
+ XSync(GLWin.dpy, false);
+
+ if( !errorTriggered )
+ mbUseLeavingPixmap = true;
+ else {
+ OSL_TRACE("XError triggered");
+ if( mbFreeLeavingPixmap ) {
+ unx::XFreePixmap( GLWin.dpy, maLeavingPixmap );
+ mbFreeLeavingPixmap = false;
+ }
+ errorTriggered = false;
+ }
- if( !errorTriggered )
- mbUseLeavingPixmap = true;
- else {
- OSL_TRACE("XError triggered");
- if( mbFreeLeavingPixmap ) {
- unx::XFreePixmap( GLWin.dpy, maLeavingPixmap );
- mbFreeLeavingPixmap = false;
- }
- errorTriggered = false;
- }
+ EnteringPixmap = glXCreatePixmap( GLWin.dpy, GLWin.fbc, maEnteringPixmap, pixmapAttribs );
- EnteringPixmap = glXCreatePixmap( GLWin.dpy, GLWin.fbc, maEnteringPixmap, pixmapAttribs );
+ // sync so that we possibly get an XError
+ unx::glXWaitGL();
+ XSync(GLWin.dpy, false);
- // sync so that we possibly get an XError
- unx::glXWaitGL();
- XSync(GLWin.dpy, false);
+ OSL_TRACE("created glx pixmap %p and %p depth: %d", LeavingPixmap, EnteringPixmap, depth);
+ if( !errorTriggered )
+ mbUseEnteringPixmap = true;
+ else {
+ OSL_TRACE("XError triggered");
+ if( mbFreeEnteringPixmap ) {
+ unx::XFreePixmap( GLWin.dpy, maEnteringPixmap );
+ mbFreeEnteringPixmap = false;
+ }
+ }
- OSL_TRACE("created glx pixmap %p and %p depth: %d", LeavingPixmap, EnteringPixmap, depth);
- if( !errorTriggered )
- mbUseEnteringPixmap = true;
- else {
- OSL_TRACE("XError triggered");
- if( mbFreeEnteringPixmap ) {
- unx::XFreePixmap( GLWin.dpy, maEnteringPixmap );
- mbFreeEnteringPixmap = false;
- }
+ // restore the error handler
+ unx::XSetErrorHandler( oldHandler );
}
-
- // restore the error handler
- unx::XSetErrorHandler( oldHandler );
- }
}
#endif
#endif
if( !mbUseLeavingPixmap )
- LeavingBytes = mxLeavingBitmap->getData(SlideBitmapLayout,SlideRect);
+ LeavingBytes = mxLeavingBitmap->getData(SlideBitmapLayout,SlideRect);
if( !mbUseEnteringPixmap )
- EnteringBytes = mxEnteringBitmap->getData(SlideBitmapLayout,SlideRect);
+ EnteringBytes = mxEnteringBitmap->getData(SlideBitmapLayout,SlideRect);
// TODO
#ifdef UNX
commit 65435f2197e1d745394c175f76a1584e5ce94b75
Author: David Tardon <dtardon at redhat.com>
Date: Fri Aug 17 10:19:16 2012 +0200
do not paint background if no fade color was set
The condition got lost in commit 2e8b2e6de14d325863d9bc419a461b75c3aaf3d0 .
Change-Id: I8c9a6baf56dfe36d55e02476823e2847d77a7f58
diff --git a/slideshow/source/engine/transitions/slidetransitionfactory.cxx b/slideshow/source/engine/transitions/slidetransitionfactory.cxx
index 4be7f1c..60ea705 100644
--- a/slideshow/source/engine/transitions/slidetransitionfactory.cxx
+++ b/slideshow/source/engine/transitions/slidetransitionfactory.cxx
@@ -420,11 +420,14 @@ void FadingSlideChange::prepareForRun(
const ViewEntry& rViewEntry,
const cppcanvas::CanvasSharedPtr& rDestinationCanvas )
{
- // clear page to given fade color. 'Leaving' slide is
- // painted atop of that, but slowly fading out.
- fillPage( rDestinationCanvas,
- ::basegfx::B2DSize( getEnteringSlideSizePixel( rViewEntry.mpView ) ),
- *maFadeColor );
+ if ( maFadeColor )
+ {
+ // clear page to given fade color. 'Leaving' slide is
+ // painted atop of that, but slowly fading out.
+ fillPage( rDestinationCanvas,
+ ::basegfx::B2DSize( getEnteringSlideSizePixel( rViewEntry.mpView ) ),
+ *maFadeColor );
+ }
}
void FadingSlideChange::performIn(
commit 19d13fd16e11f366c60e560896f49afcabc8e747
Author: David Tardon <dtardon at redhat.com>
Date: Fri Aug 17 10:01:50 2012 +0200
Revert "Fixed Bug [35079]"
The commit completely breaks slide transitions (and probably other
things as well).
This reverts commit 234738874f29ed23cd2aafb470511b5acf411e3c.
diff --git a/drawinglayer/source/primitive2d/baseprimitive2d.cxx b/drawinglayer/source/primitive2d/baseprimitive2d.cxx
index df66275..54b23ed 100644
--- a/drawinglayer/source/primitive2d/baseprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/baseprimitive2d.cxx
@@ -27,7 +27,6 @@
************************************************************************/
#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
-#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
#include <drawinglayer/geometry/viewinformation2d.hxx>
#include <basegfx/tools/canvastools.hxx>
@@ -122,27 +121,25 @@ namespace drawinglayer
basegfx::B2DRange getB2DRangeFromPrimitive2DReference(const Primitive2DReference& rCandidate, const geometry::ViewInformation2D& aViewInformation)
{
basegfx::B2DRange aRetval;
+
if(rCandidate.is())
{
- //Ignores hidden primitives that may be malpositioned
- if ((dynamic_cast< BasePrimitive2D*>(rCandidate.get()))->getPrimitive2DID() != PRIMITIVE2D_ID_HIDDENGEOMETRYPRIMITIVE2D)
- {
- // try to get C++ implementation base
- const BasePrimitive2D* pCandidate(dynamic_cast< BasePrimitive2D* >(rCandidate.get()));
+ // try to get C++ implementation base
+ const BasePrimitive2D* pCandidate(dynamic_cast< BasePrimitive2D* >(rCandidate.get()));
- if(pCandidate)
- {
- // use it if possible
- aRetval.expand(pCandidate->getB2DRange(aViewInformation));
- }
- else
- {
- // use UNO API call instead
- const uno::Sequence< beans::PropertyValue >& rViewParameters(aViewInformation.getViewInformationSequence());
- aRetval.expand(basegfx::unotools::b2DRectangleFromRealRectangle2D(rCandidate->getRange(rViewParameters)));
- }
+ if(pCandidate)
+ {
+ // use it if possible
+ aRetval.expand(pCandidate->getB2DRange(aViewInformation));
+ }
+ else
+ {
+ // use UNO API call instead
+ const uno::Sequence< beans::PropertyValue >& rViewParameters(aViewInformation.getViewInformationSequence());
+ aRetval.expand(basegfx::unotools::b2DRectangleFromRealRectangle2D(rCandidate->getRange(rViewParameters)));
}
}
+
return aRetval;
}
commit ad031fd4bd21c58a7a4b42cb47964c38a27dfb1b
Author: David Tardon <dtardon at redhat.com>
Date: Thu Aug 16 08:18:23 2012 +0200
move autodoc & friends to gbuild modules
Change-Id: I252a74587ba5b380b7bbdcc8a78247d5a9e77587
diff --git a/Makefile.top b/Makefile.top
index d08cd5e..1253984 100644
--- a/Makefile.top
+++ b/Makefile.top
@@ -32,6 +32,7 @@ UnoControls\
accessibility\
animations\
apple_remote\
+autodoc\
avmedia\
basctl\
basebmp\
@@ -46,6 +47,7 @@ codemaker\
comphelper\
configmgr\
connectivity\
+cosv\
cppcanvas\
cppu\
cppuhelper\
@@ -140,6 +142,7 @@ ucb\
ucbhelper\
ucpp\
udkapi\
+udm\
unixODBC\
unodevtools\
unoil\
@@ -165,7 +168,6 @@ xmlsecurity\
dmake_modules:=\
afms\
apache-commons\
-autodoc\
beanshell\
berkeleydb\
binfilter \
@@ -173,7 +175,6 @@ boost\
bridges\
cairo\
cli_ure\
-cosv\
cppunit\
crashrep\
ct2n\
@@ -241,7 +242,6 @@ stax\
stlport\
sysui\
tomcat\
-udm\
vigra\
xpdf\
xsltml\
commit 49e6bf7c969ba55207aa71faf3d324929571b1b9
Author: David Tardon <dtardon at redhat.com>
Date: Wed Aug 15 10:53:04 2012 +0200
fix copypasta
Change-Id: Iaf0ef140ac60088bce95d82f8b09e4e218e12dab
diff --git a/slideshow/source/engine/transitions/slidetransitionfactory.cxx b/slideshow/source/engine/transitions/slidetransitionfactory.cxx
index f61a5da..4be7f1c 100644
--- a/slideshow/source/engine/transitions/slidetransitionfactory.cxx
+++ b/slideshow/source/engine/transitions/slidetransitionfactory.cxx
@@ -547,7 +547,7 @@ void CutSlideChange::performOut(
"CutSlideChange::performOut(): Invalid sprite" );
ENSURE_OR_THROW(
rDestinationCanvas,
- "FadingSlideChange::performOut(): Invalid dest canvas" );
+ "CutSlideChange::performOut(): Invalid dest canvas" );
// Until 1/3rd of the active time, display old slide.
rSprite->setAlpha( t > 1/3.0 ? 0.0 : 1.0 );
More information about the Libreoffice-commits
mailing list