Change some of the debug messages to warnings, so compositing setup failures
show up also in release builds. svn path=/trunk/KDE/kdebase/workspace/; revision=762175
This commit is contained in:
parent
aafbb87285
commit
110f76ecd8
5 changed files with 22 additions and 12 deletions
|
@ -84,7 +84,7 @@ void Workspace::setupCompositing()
|
||||||
}
|
}
|
||||||
else if( !CompositingPrefs::compositingPossible() )
|
else if( !CompositingPrefs::compositingPossible() )
|
||||||
{
|
{
|
||||||
kDebug( 1212 ) << "Compositing isn't possible";
|
kWarning( 1212 ) << "Compositing is not possible";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if( scene != NULL )
|
if( scene != NULL )
|
||||||
|
@ -147,7 +147,7 @@ void Workspace::setupCompositing()
|
||||||
}
|
}
|
||||||
if( scene == NULL || scene->initFailed())
|
if( scene == NULL || scene->initFailed())
|
||||||
{
|
{
|
||||||
kDebug( 1212 ) << "Failed to create Scene object. Compositing disabled" << endl;
|
kError( 1212 ) << "Failed to initialize compositing, compositing disabled" << endl;
|
||||||
delete scene;
|
delete scene;
|
||||||
scene = NULL;
|
scene = NULL;
|
||||||
delete cm_selection;
|
delete cm_selection;
|
||||||
|
|
|
@ -99,11 +99,15 @@ bool hasGLExtension(const QString& extension)
|
||||||
return glExtensions.contains(extension) || glxExtensions.contains(extension);
|
return glExtensions.contains(extension) || glxExtensions.contains(extension);
|
||||||
}
|
}
|
||||||
|
|
||||||
void checkGLError( const char* txt )
|
bool checkGLError( const char* txt )
|
||||||
{
|
{
|
||||||
GLenum err = glGetError();
|
GLenum err = glGetError();
|
||||||
if( err != GL_NO_ERROR )
|
if( err != GL_NO_ERROR )
|
||||||
|
{
|
||||||
kWarning() << "GL error (" << txt << "): 0x" << QString::number( err, 16 ) ;
|
kWarning() << "GL error (" << txt << "): 0x" << QString::number( err, 16 ) ;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int nearestPowerOfTwo( int x )
|
int nearestPowerOfTwo( int x )
|
||||||
|
|
|
@ -61,7 +61,7 @@ bool KWIN_EXPORT hasGLXVersion(int major, int minor, int release = 0);
|
||||||
bool KWIN_EXPORT hasGLExtension(const QString& extension);
|
bool KWIN_EXPORT hasGLExtension(const QString& extension);
|
||||||
|
|
||||||
// detect OpenGL error (add to various places in code to pinpoint the place)
|
// detect OpenGL error (add to various places in code to pinpoint the place)
|
||||||
void KWIN_EXPORT checkGLError( const char* txt );
|
bool KWIN_EXPORT checkGLError( const char* txt );
|
||||||
|
|
||||||
inline bool KWIN_EXPORT isPowerOfTwo( int x ) { return (( x & ( x - 1 )) == 0 ); }
|
inline bool KWIN_EXPORT isPowerOfTwo( int x ) { return (( x & ( x - 1 )) == 0 ); }
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -125,7 +125,7 @@ SceneOpenGL::SceneOpenGL( Workspace* ws )
|
||||||
!glXGetVisualFromFBConfig || !glXCreatePixmap || !glXDestroyPixmap ||
|
!glXGetVisualFromFBConfig || !glXCreatePixmap || !glXDestroyPixmap ||
|
||||||
!glXCreateWindow || !glXDestroyWindow )
|
!glXCreateWindow || !glXDestroyWindow )
|
||||||
{
|
{
|
||||||
kDebug( 1212 ) << "GLX_SGIX_fbconfig or required GLX functions missing";
|
kWarning( 1212 ) << "GLX_SGIX_fbconfig or required GLX functions missing";
|
||||||
return; // error
|
return; // error
|
||||||
}
|
}
|
||||||
if( !selectMode())
|
if( !selectMode())
|
||||||
|
@ -162,7 +162,11 @@ SceneOpenGL::SceneOpenGL( Workspace* ws )
|
||||||
glOrtho( 0, displayWidth(), displayHeight(), 0, 0, 65535 );
|
glOrtho( 0, displayWidth(), displayHeight(), 0, 0, 65535 );
|
||||||
glMatrixMode( GL_MODELVIEW );
|
glMatrixMode( GL_MODELVIEW );
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
checkGLError( "Init" );
|
if( checkGLError( "Init" ))
|
||||||
|
{
|
||||||
|
kWarning( 1212 ) << "OpenGL compositing setup failed";
|
||||||
|
return; // error
|
||||||
|
}
|
||||||
kDebug( 1212 ) << "DB:" << db << ", TFP:" << tfp_mode << ", SHM:" << shm_mode
|
kDebug( 1212 ) << "DB:" << db << ", TFP:" << tfp_mode << ", SHM:" << shm_mode
|
||||||
<< ", Direct:" << bool( glXIsDirect( display(), ctxbuffer )) << endl;
|
<< ", Direct:" << bool( glXIsDirect( display(), ctxbuffer )) << endl;
|
||||||
init_ok = true;
|
init_ok = true;
|
||||||
|
@ -363,7 +367,7 @@ bool SceneOpenGL::initBuffer()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
kDebug( 1212 ) << "Couldn't create output buffer (failed to create overlay window?) !";
|
kWarning( 1212 ) << "Couldn't create output buffer (failed to create overlay window?) !";
|
||||||
return false; // error
|
return false; // error
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -445,7 +449,7 @@ bool SceneOpenGL::initBufferConfigs()
|
||||||
XFree( fbconfigs );
|
XFree( fbconfigs );
|
||||||
if( fbcbuffer_db == NULL && fbcbuffer_nondb == NULL )
|
if( fbcbuffer_db == NULL && fbcbuffer_nondb == NULL )
|
||||||
{
|
{
|
||||||
kDebug( 1212 ) << "Couldn't find framebuffer configuration for buffer!";
|
kWarning( 1212 ) << "Couldn't find framebuffer configuration for buffer!";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -558,12 +562,12 @@ bool SceneOpenGL::initDrawableConfigs()
|
||||||
XFree( fbconfigs );
|
XFree( fbconfigs );
|
||||||
if( fbcdrawableinfo[ DefaultDepth( display(), DefaultScreen( display())) ].fbconfig == NULL )
|
if( fbcdrawableinfo[ DefaultDepth( display(), DefaultScreen( display())) ].fbconfig == NULL )
|
||||||
{
|
{
|
||||||
kDebug( 1212 ) << "Couldn't find framebuffer configuration for default depth!";
|
kWarning( 1212 ) << "Couldn't find framebuffer configuration for default depth!";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if( fbcdrawableinfo[ 32 ].fbconfig == NULL )
|
if( fbcdrawableinfo[ 32 ].fbconfig == NULL )
|
||||||
{
|
{
|
||||||
kDebug( 1212 ) << "Couldn't find framebuffer configuration for depth 32!";
|
kWarning( 1212 ) << "Couldn't find framebuffer configuration for depth 32!";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -87,12 +87,12 @@ SceneXrender::SceneXrender( Workspace* ws )
|
||||||
{
|
{
|
||||||
if( !Extensions::renderAvailable())
|
if( !Extensions::renderAvailable())
|
||||||
{
|
{
|
||||||
kDebug( 1212 ) << "No xrender extension available";
|
kWarning( 1212 ) << "No XRender extension available";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if( !Extensions::fixesRegionAvailable())
|
if( !Extensions::fixesRegionAvailable())
|
||||||
{
|
{
|
||||||
kDebug( 1212 ) << "No xfixes v3+ extension available";
|
kWarning( 1212 ) << "No XFixes v3+ extension available";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
KXErrorHandler xerr;
|
KXErrorHandler xerr;
|
||||||
|
@ -113,6 +113,8 @@ SceneXrender::SceneXrender( Workspace* ws )
|
||||||
}
|
}
|
||||||
createBuffer();
|
createBuffer();
|
||||||
init_ok = !xerr.error( true );
|
init_ok = !xerr.error( true );
|
||||||
|
if( !init_ok )
|
||||||
|
kWarning( 1212 ) << "XRender compositing setup failed";
|
||||||
}
|
}
|
||||||
|
|
||||||
SceneXrender::~SceneXrender()
|
SceneXrender::~SceneXrender()
|
||||||
|
|
Loading…
Reference in a new issue