2007-11-27 22:40:25 +03:00
|
|
|
/********************************************************************
|
2007-09-18 17:59:06 +04: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 22:40:25 +03: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 17:59:06 +04:00
|
|
|
|
|
|
|
#ifndef KWIN_COMPOSITINGPREFS_H
|
|
|
|
#define KWIN_COMPOSITINGPREFS_H
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
#include <QStringList>
|
|
|
|
|
|
|
|
#include "kwinglutils.h"
|
2008-10-15 17:41:53 +04:00
|
|
|
#include "kwinglobals.h"
|
2007-09-18 17:59:06 +04:00
|
|
|
|
|
|
|
|
|
|
|
namespace KWin
|
|
|
|
{
|
|
|
|
|
|
|
|
class CompositingPrefs
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CompositingPrefs();
|
|
|
|
~CompositingPrefs();
|
|
|
|
|
2007-09-26 20:34:08 +04:00
|
|
|
static bool compositingPossible();
|
2007-11-12 19:32:25 +03:00
|
|
|
static QString compositingNotPossibleReason();
|
2009-12-04 12:29:08 +03:00
|
|
|
bool recommendCompositing() const;
|
2011-01-30 17:34:42 +03:00
|
|
|
bool enableVSync() const {
|
|
|
|
return mEnableVSync;
|
|
|
|
}
|
|
|
|
bool enableDirectRendering() const {
|
|
|
|
return mEnableDirectRendering;
|
|
|
|
}
|
|
|
|
bool strictBinding() const {
|
|
|
|
return mStrictBinding;
|
|
|
|
}
|
2007-09-18 17:59:06 +04:00
|
|
|
|
|
|
|
void detect();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
void detectDriverAndVersion();
|
|
|
|
void applyDriverSpecificOptions();
|
|
|
|
|
2008-01-22 20:04:41 +03:00
|
|
|
bool initGLXContext();
|
2007-09-18 17:59:06 +04:00
|
|
|
void deleteGLXContext();
|
2010-12-12 14:08:23 +03:00
|
|
|
bool initEGLContext();
|
|
|
|
void deleteEGLContext();
|
2007-09-18 17:59:06 +04:00
|
|
|
|
|
|
|
|
|
|
|
private:
|
2009-12-04 12:29:08 +03:00
|
|
|
bool mRecommendCompositing;
|
2007-09-18 17:59:06 +04:00
|
|
|
bool mEnableVSync;
|
|
|
|
bool mEnableDirectRendering;
|
2007-10-17 19:37:14 +04:00
|
|
|
bool mStrictBinding;
|
2007-09-18 17:59:06 +04:00
|
|
|
|
2007-12-17 17:14:53 +03:00
|
|
|
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
2010-12-12 14:08:23 +03:00
|
|
|
#ifdef KWIN_HAVE_OPENGLES
|
|
|
|
EGLDisplay mEGLDisplay;
|
|
|
|
EGLContext mEGLContext;
|
|
|
|
EGLSurface mEGLSurface;
|
|
|
|
#else
|
2007-09-18 17:59:06 +04:00
|
|
|
GLXContext mGLContext;
|
2007-09-18 18:48:01 +04:00
|
|
|
#endif
|
2010-12-12 14:08:23 +03:00
|
|
|
Window mGLWindow;
|
2010-11-20 15:33:24 +03:00
|
|
|
#endif
|
2007-09-18 17:59:06 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //KWIN_COMPOSITINGPREFS_H
|
|
|
|
|
|
|
|
|