[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.0/kdebase/workspace/kwin
From: Luboš Luňák <l.lunak () kde ! org>
Date: 2008-01-16 12:48:41
Message-ID: 1200487721.911112.11003.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 762177 by lunakl:
Change some of the debug messages to warnings, so compositing setup failures
show up also in release builds.
M +2 -2 composite.cpp
M +5 -1 lib/kwinglutils.cpp
M +1 -1 lib/kwinglutils.h
M +10 -6 scene_opengl.cpp
M +4 -2 scene_xrender.cpp
--- branches/KDE/4.0/kdebase/workspace/kwin/composite.cpp #762176:762177
@@ -84,7 +84,7 @@
}
else if( !CompositingPrefs::compositingPossible() )
{
- kDebug( 1212 ) << "Compositing isn't possible";
+ kWarning( 1212 ) << "Compositing is not possible";
return;
}
if( scene != NULL )
@@ -147,7 +147,7 @@
}
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;
scene = NULL;
delete cm_selection;
--- branches/KDE/4.0/kdebase/workspace/kwin/lib/kwinglutils.cpp #762176:762177
@@ -99,11 +99,15 @@
return glExtensions.contains(extension) || glxExtensions.contains(extension);
}
-void checkGLError( const char* txt )
+bool checkGLError( const char* txt )
{
GLenum err = glGetError();
if( err != GL_NO_ERROR )
+ {
kWarning() << "GL error (" << txt << "): 0x" << QString::number( err, 16 ) ;
+ return true;
+ }
+ return false;
}
int nearestPowerOfTwo( int x )
--- branches/KDE/4.0/kdebase/workspace/kwin/lib/kwinglutils.h #762176:762177
@@ -61,7 +61,7 @@
bool KWIN_EXPORT hasGLExtension(const QString& extension);
// 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 ); }
/**
--- branches/KDE/4.0/kdebase/workspace/kwin/scene_opengl.cpp #762176:762177
@@ -125,7 +125,7 @@
!glXGetVisualFromFBConfig || !glXCreatePixmap || !glXDestroyPixmap ||
!glXCreateWindow || !glXDestroyWindow )
{
- kDebug( 1212 ) << "GLX_SGIX_fbconfig or required GLX functions missing";
+ kWarning( 1212 ) << "GLX_SGIX_fbconfig or required GLX functions missing";
return; // error
}
if( !selectMode())
@@ -162,7 +162,11 @@
glOrtho( 0, displayWidth(), displayHeight(), 0, 0, 65535 );
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
- checkGLError( "Init" );
+ if( checkGLError( "Init" ))
+ {
+ kWarning( 1212 ) << "OpenGL compositing setup failed";
+ return; // error
+ }
kDebug( 1212 ) << "DB:" << db << ", TFP:" << tfp_mode << ", SHM:" << shm_mode
<< ", Direct:" << bool( glXIsDirect( display(), ctxbuffer )) << endl;
init_ok = true;
@@ -363,7 +367,7 @@
}
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 true;
@@ -445,7 +449,7 @@
XFree( fbconfigs );
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 true;
@@ -558,12 +562,12 @@
XFree( fbconfigs );
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;
}
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 true;
--- branches/KDE/4.0/kdebase/workspace/kwin/scene_xrender.cpp #762176:762177
@@ -87,12 +87,12 @@
{
if( !Extensions::renderAvailable())
{
- kDebug( 1212 ) << "No xrender extension available";
+ kWarning( 1212 ) << "No XRender extension available";
return;
}
if( !Extensions::fixesRegionAvailable())
{
- kDebug( 1212 ) << "No xfixes v3+ extension available";
+ kWarning( 1212 ) << "No XFixes v3+ extension available";
return;
}
KXErrorHandler xerr;
@@ -113,6 +113,8 @@
}
createBuffer();
init_ok = !xerr.error( true );
+ if( !init_ok )
+ kWarning( 1212 ) << "XRender compositing setup failed";
}
SceneXrender::~SceneXrender()
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic