2007-11-27 19:40:25 +00:00
|
|
|
/********************************************************************
|
2007-09-18 13:59:06 +00:00
|
|
|
KWin - the KDE window manager
|
|
|
|
This file is part of the KDE project.
|
|
|
|
|
|
|
|
Copyright (C) 2007 Rivo Laks <rivolaks@hot.ee>
|
|
|
|
|
2007-11-27 19:40:25 +00:00
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*********************************************************************/
|
2007-09-18 13:59:06 +00:00
|
|
|
|
|
|
|
#ifndef KWIN_COMPOSITINGPREFS_H
|
|
|
|
#define KWIN_COMPOSITINGPREFS_H
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
#include <QStringList>
|
|
|
|
|
|
|
|
#include "kwinglutils.h"
|
2008-10-15 13:41:53 +00:00
|
|
|
#include "kwinglobals.h"
|
2007-09-18 13:59:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
namespace KWin
|
|
|
|
{
|
|
|
|
|
|
|
|
class CompositingPrefs
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CompositingPrefs();
|
|
|
|
~CompositingPrefs();
|
|
|
|
|
2007-09-26 16:34:08 +00:00
|
|
|
static bool compositingPossible();
|
2007-11-12 16:32:25 +00:00
|
|
|
static QString compositingNotPossibleReason();
|
2011-04-03 19:59:57 +00:00
|
|
|
static bool openGlIsBroken();
|
2011-07-20 20:10:03 +00:00
|
|
|
/**
|
|
|
|
* Tests whether GLX is supported and returns @c true
|
|
|
|
* in case KWin is compiled with OpenGL support and GLX
|
|
|
|
* is available.
|
|
|
|
*
|
|
|
|
* If KWin is compiled with OpenGL ES or without OpenGL at
|
|
|
|
* all, @c false is returned.
|
|
|
|
* @returns @c true if GLX is available, @c false otherwise and if not build with OpenGL support.
|
|
|
|
**/
|
|
|
|
static bool hasGlx();
|
2011-01-30 14:34:42 +00:00
|
|
|
bool enableDirectRendering() const {
|
|
|
|
return mEnableDirectRendering;
|
|
|
|
}
|
2007-09-18 13:59:06 +00:00
|
|
|
|
|
|
|
void detect();
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool mEnableDirectRendering;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //KWIN_COMPOSITINGPREFS_H
|
|
|
|
|
|
|
|
|