Commit Graph

79 Commits (1c8233ad6dc55a2de55eed1db3412171ddd5d2eb)

Author SHA1 Message Date
Martin Gräßlin 139201a2e2 KGlobal::config() -> KSharedConfig::openConfig()
KWin Core says good bye to KGlobal. We will not miss the threading
issues.
2013-09-04 16:11:40 +02:00
Martin Gräßlin 57905c0cc2 And we got rid of KDebug
Usages of kBacktrace got dropped.
2013-09-02 13:14:39 +02:00
Anselmo L. S. Melo c9b079e628 Porting kwin main, data and compositingprefs to Qt5/KF5: QStandardPaths
REVIEW: 111971
2013-08-13 17:53:39 -03:00
Martin Gräßlin 5d0433f20b Drop some no longer needed includes
Less warnings
2013-08-06 11:38:52 +02:00
Martin Gräßlin 330d40f425 Fix no cast to/from ASCII intrduced issues
* "" needs to be wrapped in QStringLiteral
* QString::fromUtf8 needed for const char* and QByteArray
* QByteArray::constData() needed to get to the const char*
2013-07-24 09:58:33 +02:00
Martin Gräßlin bab5f16d3c Egl Backend using a Wayland surface for rendering
This backend is able to composite on a Wayland surface instead of an X11
overlay window. It can be considered as a prototype for a Wayland session
compositor.

For texture from X11 pixmap the backend uses XShm. This is far from
optimal, but the KHR_image_pixmap extension is not available in Mesa's
Wayland backend. It's a temporary solution till we have XWayland and
texture from Wayland buffer.

To use this backend one needs to specify the environment variable
KWIN_OPENGL_INTERFACE with "egl_wayland". In future KWin should probably
use this backend if the Wayland display env variable is defined.

To use this setup:
1. Have a normal X-Server running on e.g. VT7
2. Start Weston on VT1
3. Start a terminal on Weston
4. start KWin with:

DISPLAY=:0 KWIN_OPENGL_INTERFACE=egl_wayland kwin --replace &

This should map a Wayland surface to Weston showing the content of the X
setup. At the moment it's not yet possible to interact with the surface
as input events are not yet recieved in the backend.

There are still a lot of limitations as documented in the code.
2013-06-05 13:45:45 +02:00
Martin Gräßlin 92bc318e45 Only execute kwin_opengl_test if OpenGL/GLX is going to be used
* don't execute OpenGL test app if user selected XRender
* don't execute OpenGL test app if user forces to EGL

If a user selected XRender because OpenGL is failing badly it might not
be the best idea to call an OpenGL application.

If the user enforces EGL it's kind of pointless to call a testapp which
uses GLX.

REVIEW: 110659
2013-05-28 07:39:17 +02:00
Martin Gräßlin bd01bfefb4 Improve multi-head detection for OpenGLIsUnsafe
This was currently basically broken:
* Screen number got always attached
* openGLIsBroken did not check for screen number
-> KCM reported "everything is fine" while it wasn't

Now changed to:
* only attach screen number if it is a multi-head setup
* use same logic in both Composite and CompositingPrefs

Still problematic:
* kcm is not multi-head aware so it will report everything is fine in
  case of a broken multi-head setup

REVIEW: 110631
2013-05-27 08:16:21 +02:00
Martin Gräßlin 0ccc060218 Include KGlobal were needed
With KF5 some includes which used to include KGlobal, e.g. KStandardDirs
do no longer include KGlobal. So if we use KGlobal we should include it.
2013-03-07 13:59:15 +01:00
Martin Gräßlin 60c42b7a34 s/KLocale/KLocalizedString/g
Many headers included KLocale to use i18n and co. But those methods are
defined in KLocalizedString and not in KLocale.

With KF5 klocale.h does no longer include KLocalizedString causing lots
of compile errors.
2013-03-07 13:59:15 +01:00
Martin Gräßlin b967527db3 Use XCB to resolve the X11 Extensions
The extension handling is removed from kwinglobals and moved into the
xcbutils in KWin core in namespace KWin::Xcb. The motivation for this
change is that the Extensions are only used in KWin core and are marked
as internal. So there is no need to have them in the library.

What remains in Extensions are the non-native pixmaps. This will be
removed once we are on Qt 5 as QPixmap can no longer reference an XPixmap.

The remaining code in kwinglobals also still initialize the XLib versions
of extensions emitting events. It seems like there are no XEvents emitted
if not done so even if the extension is correctly initialized with xcb.
This needs to be removed once the event handling is ported over to xcb.

REVIEW: 107832
2013-01-22 07:50:03 +01:00
Martin Gräßlin bb5dce0e3b Use KGlobal::config() instead of specifying kwinrc
Inside KWin we can just use the global configuration
instead of manually opening kwinrc which is just the
same.

REVIEW: 104754
2012-04-29 21:55:45 +02:00
Martin Gräßlin fdd804bdf4 Remove GL context creation from CompositingPrefs
Whether creating the OpenGL context succeeds or not
had no influence in any decisions on the used settings
for OpenGL based compositing.

The only valid information CompositingPrefs still detects
is whether direct rendering should be used which is
performed out of process and does not require a context.

So overall the context creation is not needed and can
be removed.

REVIEW: 104778
2012-04-29 21:46:43 +02:00
Martin Gräßlin 2fc0b8074b Move detection of GLPlatform and printResults into Scene
This means the GLPlatform is filled with values from the
context actually used for Compositing and if XRender
compositing is used no OpenGL information is logged.
2012-04-29 21:44:35 +02:00
Martin Gräßlin 23708521c6 Make GLVSync a complete user controlled variable
There is no need to have it driver specific any more.
All drivers seem to support it (only Intel had been
opt-ed out without any apparent reason shown in commit log).

This was the last driver specific setting which means that
the method applyDriverSpecificSettings() got dropped from
CompositingPrefs.
2012-04-29 21:44:35 +02:00
Martin Gräßlin bcbbf3c5a8 Drop recommendCompositing from CompositingPrefs
It's always true which means it's no longer needed.
2012-04-29 21:44:34 +02:00
Martin Gräßlin d6540c8392 Remove strict binding from compositing prefs
Strict binding follows the driver (GLPlattform) unless
the user has a config value specified in the kwinrc.

For this a new property is added to Options to indicate
whether strict binding is user defined or follows the
driver. In case of driver the strict binding option is
set when OpenGL compositor starts up.
2012-04-29 21:44:34 +02:00
Philipp Knechtges cd585972ae kwin: avoid SEGFAULT in case of egl_glx
The mesa egl_glx egl driver only provides indirect rendering which is
insufficient for GLES2.
2011-12-01 22:45:10 +01:00
Martin Gräßlin 987bc837d9 Remove define KWIN_HAVE_OPENGL_COMPOSITING
Due to changes in build system we have always either OpenGL or OpenGL ES.
This allows to remove the KWIN_HAVE_OPENGL_COMPOSITING define. In the
effects the define is kept as KWIN_HAVE_OPENGL which can be used in
future to build also an XRender only effect system.
2011-08-13 16:46:43 +02:00
Martin Gräßlin b7d2b16b8d Remove define KWIN_HAVE_COMPOSITING
Building the workspaces requires to have all the build dependencies
which were required for KWIN_HAVE_COMPOSITING to be set. This allows
us to remove all the ifdefs for this and gives us a cleaner code.
2011-08-13 16:46:43 +02:00
Martin Gräßlin 5213c4aff6 Drop direct rendering setting
The advanced compositing option "direct rendering" could only
correctly be honored in the case of proprietary NVIDIA drivers.
In all other cases playing with the setting was most likely
harmful as it could result in inconsistent states and the
option not to be honored at all.

This patch resolves this issue by moving the detection whether
to use a direct rendering context completely into the hands of
 the set environment variables or the helper program:
* if LIBGL_ALWAYS_INDIRECT is set, we use an indirect context
* if KWIN_DIRECT_GL is set, we use a direct context
* if none of the two are set, we use the helper program, if it
  returns 0 we create a direct context, otherwise we set
  LIBGL_ALWAYS_INDIRECT and create an indirect context

If a user really wants to influence the behavior the
environment variables can be used.

REVIEW: 102074
2011-07-31 17:40:03 +02:00
Martin Gräßlin c3cf4482a3 Move GLX detection from kwinglobals to CompositingPrefs
Removes the Extension::glxAvailable() from kwinglobals and
implements the functionality in CompositingPrefs, where it
is only needed. There used to be one additional check in
scene_opengl_glx.cpp which is moved into composite.cpp
before the OpenGL Scene is created.

REVIEW: 102002
2011-07-27 18:34:31 +02:00
Thomas Lübking 364ce6fbfc Allow the user to rearm OpenGLIsUnsafe KWIn autocrash protection
Also add a usable "doesn't work why" info and WARN! the user about clicking the rearm button.
Merge "OpenGLIsUnsafe" and "CheckIsSafe" config keys
Move the entire checking into CompositingPrefs

BUG:250865
FIXED-IN:4.7
2011-05-11 20:16:08 +02:00
Martin Gräßlin 0a7e48f7aa KWin uses kdelibs coding style. 2011-01-31 20:07:03 +01:00
Martin Gräßlin 1b70279664 Removing Xgl support from KWin.
Xgl has been removed from the X tree in 2008. It does not make sense
to still support it in KWin.
2011-01-30 14:24:48 +01:00
Martin Gräßlin ea08ae0929 Fix rebasing failure 2011-01-30 14:12:03 +01:00
Martin Gräßlin c24fa39acb CompositingPrefs work with EGL 2011-01-30 14:12:01 +01:00
Martin Gräßlin e5932ff214 Make it compile again after rebasing on current trunk 2011-01-30 14:11:58 +01:00
Martin Gräßlin aef6208fdc Fix compiling 2011-01-30 14:11:57 +01:00
Martin Gräßlin 0f0509cbd9 Make it compile with EGL 2011-01-30 14:11:56 +01:00
Andriy Rysin 0f2e500abd Allow kdelibs/kdebase compile without glu library (review 6213)
svn path=/trunk/KDE/kdebase/workspace/; revision=1209642
2010-12-27 19:12:37 +00:00
Fredrik Höglund 13eaca37f4 Remove the driver detection code from CompositingPrefs, and use
the new GLPlatform class instead.

This change also enables loose binding with the R600 drivers
when DRI2 is being used.

svn path=/trunk/KDE/kdebase/workspace/; revision=1203402
2010-12-03 21:13:43 +00:00
Martin Gräßlin aa4e2c0c54 Print useful version information for nouveau.
Unknown, unknown just looks bad given that we will have more
nouveau users in future. Neither the vendor, nor the renderer
nor the version string contains a version number. The information
most close to a version number is the gallium number. Other
possible number would be OpenGL version or Mesa version in the
GL version string, but those information is not used in other
Mesa drivers.

svn path=/trunk/KDE/kdebase/workspace/; revision=1184526
2010-10-10 17:40:43 +00:00
Luboš Luňák 654995d6aa recent intel renderer strings are like
'Mesa DRI Intel(R) 965G GEM 20100328 2010Q1 x86/MMX/SSE2',
having one more field from the end - fix reading version
(bnc#605498)


svn path=/trunk/KDE/kdebase/workspace/; revision=1139202
2010-06-17 16:23:45 +00:00
Fredrik Höglund bcd8d3f476 - Add an external helper program that initializes GLX and checks if kwin can
use direct rendering.
- Move the LIBGL_ALWAYS_INDIRECT code to CompositingPrefs::detect(), and use
  the external helper program to determine if the variable needs to be set.

svn path=/trunk/KDE/kdebase/workspace/; revision=1096554
2010-02-26 20:47:00 +00:00
Lucas Murray fd47ff5332 Revert r1082246 as it needs to be done in CompositingPrefs::detect()
to work correctly but as doing it there defeats the purpose of moving
the code to begin with there's no point in moving it.
BUG: 226049

svn path=/trunk/KDE/kdebase/workspace/; revision=1088054
2010-02-10 02:53:33 +00:00
Lucas Murray 2a34e440f5 Change the location where LIBGL_ALWAYS_INDIRECT is set and add some
useful documentation about when it is used and why it is required.

svn path=/trunk/KDE/kdebase/workspace/; revision=1082246
2010-01-30 08:27:24 +00:00
Lucas Murray 8960c552d2 Remove OpenGL driver whitelist; Add protection against crashy glXQuery
functions and share the value with the KCM; Fallback to XRender
compositing if OpenGL fails to work correctly; Rearrange setting order
in options.h slightly and fix variable names

svn path=/trunk/KDE/kdebase/workspace/; revision=1079919
2010-01-25 10:02:08 +00:00
Luboš Luňák 7cef1eadd5 use recommendation from compositing prefs only if there's
no explicit choice (because of driver crashes)


svn path=/trunk/KDE/kdebase/workspace/; revision=1058248
2009-12-04 09:29:08 +00:00
Fredrik Höglund 37fbc26205 Enable OpenGL compositing by default with R600/R700 cards and Mesa 7.7+.
svn path=/trunk/KDE/kdebase/workspace/; revision=1058207
2009-12-04 08:58:54 +00:00
Sebastian Kügler 7d9155171d compositing detection for r300
I've had missing compositing since about a week on my ATI x1300.

After a bit of debugging with the help of fredrikh and mgraesslin, the version string reported seems to be the culprit. I've special-cased the different version string for the R300 driver and it works again now.

The strings my r300 reports are:

DRI R300 Project
Mesa DRI R300 (RV515 7149) 20090101 x86/MMX/SSE2 TCL
1.4 (1.5 Mesa 7.6)

reviewed by fredrikh

kwin people, please have another look, I don't want to break anybody else's setup...

CCMAIL:kwin@kde.org

svn path=/trunk/KDE/kdebase/workspace/; revision=1058156
2009-12-04 01:13:33 +00:00
Lucas Murray 424d358fd2 Less Krazy warnings please.
svn path=/trunk/KDE/kdebase/workspace/; revision=1042583
2009-10-30 08:10:35 +00:00
Lucas Murray 8a8428e41c Less Krazy warnings please.
svn path=/trunk/KDE/kdebase/workspace/; revision=1042572
2009-10-30 06:51:59 +00:00
Luboš Luňák 747c9b1f3e Detect radeon by using at least "Mesa DRI R", not
just the way too generic "Mesa DRI".


svn path=/trunk/KDE/kdebase/workspace/; revision=980487
2009-06-11 20:58:51 +00:00
Dirk Mueller 329cddf5bd Detect mobil intel chips as intel chips, not ATI
svn path=/trunk/KDE/kdebase/workspace/; revision=980438
2009-06-11 18:53:23 +00:00
Martin Gräßlin 7991f3e99d Ati changed the OpenGL version string. It used to be in the first part, now it is in the second part encapsulated in parenthesis. So new driver versions are now recognized again. Looking forward to the next change.
svn path=/trunk/KDE/kdebase/workspace/; revision=959824
2009-04-27 10:12:12 +00:00
Luboš Luňák ab6772a8c9 Enable compositing with nvidia by default only for driver 173.14.12 and up,
this rules out GeForce4 and below, but there it's still possible to enable
it explicitly if the user finds it good enough.


svn path=/trunk/KDE/kdebase/workspace/; revision=880710
2008-11-06 09:31:33 +00:00
Enrique Matías Sánchez f5efd9ca28 SVN_SILENT Fix typos in kdebase
svn path=/trunk/KDE/kdebase/workspace/; revision=875089
2008-10-23 09:31:44 +00:00
Luboš Luňák ecfaf59014 I forgot to actually enable compositing by default for some cards listed
on the HW techbase page, do so for intel Gxx cards, radeon r200 and fglrx.


svn path=/trunk/KDE/kdebase/workspace/; revision=871764
2008-10-15 14:10:43 +00:00
Luboš Luňák 5a7557fc6f Force OpenGL compositing to be off if OpenGL rendering is done in software
(second X session with Intel).


svn path=/trunk/KDE/kdebase/workspace/; revision=871752
2008-10-15 13:41:53 +00:00