Commit Graph

60 Commits (20a9a2a247807e5e6c34e96ddbc33d7faf6f6105)

Author SHA1 Message Date
Martin Gräßlin 01451eea36 Revert "Handle conflicts between epoxy and manually resolved function pointers"
This reverts commit ac1dbac8b1.
2015-11-17 14:58:59 +01:00
Martin Gräßlin ac1dbac8b1 Handle conflicts between epoxy and manually resolved function pointers
For the functions from GL_FOO_robustness we want to resolve it by
ourselves in order to add a custom implementation if it's not available.
Unfortunately once epoxy.h is included this breaks as epoxy defines the
names and so through the preprocessor epoxy always wins.

So we need different names: all functions from robustness get a "kwin"
prefix and the usage is changed everywhere in kwin source code.

REVIEW: 125883
2015-11-11 08:04:29 +01:00
Martin Gräßlin aa43852301 Remove build checks for gles or gl
Also removes the building of the kwinglesutils, there's only
kwinglutils now.

REVIEW: 125865
2015-11-03 09:29:37 +01:00
Marco Martin 3f5bf65a9e Use the kwayland blur protocol in the blur effect
use the new blur protocol to fetch information about the
region of blur behind to apply to windows like Plasma::Dialog
REVIEW:125017
2015-09-02 14:43:44 +02:00
Martin Gräßlin 57c521c214 [libkwineffects] Introduce logging categories for libkwineffects 2015-07-31 12:16:15 +02:00
Martin Gräßlin c31bb6d46f Drop KF5::Service dependency where it's no longer needed 2015-07-07 09:53:48 +02:00
Martin Gräßlin 4f80a3d3a8 Increase so-version for kwineffect libraries
Known ABI changes in at least GLTexture, probably more places.
2015-01-09 14:13:02 +01:00
Jonathan Riddell dc554ed256 use standard way to version applications in Plasma 2014-08-20 15:43:27 +02:00
Fredrik Höglund 3b8b1455a6 Use libepoxy to resolve GL functions
Remove the manually written GL dispatch code, and use libepoxy
to resolve functions.

The only exceptions are GLX_MESA_swap_control, which is not in
the XML API registry, and GL_ARB_robustness/GL_EXT_robustness.
For the latter we want to resolve the functions to the same names
on both GLES and desktop GL, and plug in our own implementations
when the extension is not supported.
2014-07-14 12:04:37 +02:00
Martin Gräßlin a3ca68ddbe [libkwineffects] Add proper version and soversion to libs
Uses ecm to generate version information.

REVIEW: 118034
2014-05-08 14:41:03 +02:00
Martin Gräßlin dcfc5582ec [kwin] Generate export header for kwinxrenderutils 2014-03-26 14:02:16 +01:00
Martin Gräßlin e3179841f3 [kwin] Create an own library for kwinxrenderutils
XRenderUtils are split out of kwineffects and are an own library just
like kwinglutils is an own library.

The library gets always build and is linked in KWin core unconditionally
(as it's used in outline) and conditionally in kwineffects (PaintClipper)
and the built in effects depending on XRender build option.
2014-03-26 14:02:16 +01:00
Aleix Pol df58c38b7c Stop including KDE4_INCLUDES globally
Depend on libraries specifically instead.
2014-03-18 18:02:03 +01:00
Martin Gräßlin 23e6fbbb71 [kwin] Add missing target link libraries
Missing libs caused compile error if built standalone.
2014-03-18 14:38:00 +01:00
Martin Gräßlin c7d986c7fe [kwin] Remove the legacy OpenGL 1 compositing backend
KWin already has a de facto OpenGL 2 dependency through QML. Combined
with the fact that the OpenGL 1 backend is basically unmaintained and
also unused, it's better to remove it for the new major release.

This change includes:
 * Removal of cmake option KWIN_BUILD_OPENGL_1_COMPOSITING
 * Removal of KWIN_HAVE_OPENGL_1 compile option and all code
   ifdef'ed with it (partially removal of if-else constructs)
 * Removal of CompositingType::OpenGL1Compositing (flags are kept
   as a core flag should get introduced)
 * Driver recommendation for OpenGL1Compositing changed to XRender
   (should be evaluated whether the drivers can provide GL2)
 * Removal of configuration option "GLLegacy"
 * Removal of fooMatrix function in kwinglutils
 * Removal of ARBBlurShader
 * Removal of legacy code path in GLVertexBuffer
 * Removal of GLShaderManager::disable
 * if-blocks with ShaderManager::instance()->isValid() removed

REVIEW: 116042
2014-03-10 08:59:11 +01:00
Martin Gräßlin a60d10bedd [kwin] Fix generate export header for kwinglesutils
If we build kwinglesutils we need to adjust the name of the generated
export macros to still be called kwinglutils.
2014-03-05 11:35:18 +01:00
Martin Gräßlin 4586767db8 [kwin] Use imported targets for all XCB libs
Requires 04f78489265b6e52cabd2980dfc417abeee3a695 from ECM
2014-02-25 15:48:39 +01:00
Martin Gräßlin 2c7d702b5a [kwin] Use FindEgl for finding egl instead of FindOpenGLES
Requires a2ada35b5c768e8efe9b51a41f84ec6e18ea805c from ECM!
2014-02-25 13:50:10 +01:00
Martin Klapetek 54bc491c46 Port to KF5 renaming changes 2013-12-11 21:41:47 +01:00
Egor Matirov 05c2849fee Added export header through cmake for libkwinglutils
REVIEW: 114265
2013-12-03 14:37:29 +01:00
Jacob Logan 0c4518cca9 added export header through cmake for kwineffects
REVIEW: 114233
2013-12-02 07:43:26 +01:00
Martin Gräßlin 1ea1fb4fbd Unit test for WindowQuadList::makeGrid and ::makeRegularGrid 2013-11-25 09:27:31 +01:00
Martin Gräßlin 7c2448227a [libkwineffects] Improving linking of kwinglutils library
Only needs:
* Qt5::DBus for the communication with color correction
* Qt5::X11Extras for access to XCB, pulls in needed Qt5::Gui
* XCB component XCB for xcb calls in kwinglobals.h
2013-11-19 12:12:57 +01:00
Aleix Pol 7b110f0671 Improve CMake usage
It's basically a run of the port-cmake.sh script in here, mostly the changes
are the following:
- Using KF5::* targets
- Using the proper macros, following recent developments in frameworks
2013-11-15 13:37:47 +01:00
David Faure 57ff76150e Fix cmake warnings due to LINK_INTERFACE_LIBRARIES, use PUBLIC/PRIVATE instead. 2013-11-10 20:45:23 +01:00
Martin Gräßlin e3618e8796 [kwin] Follow Qt's OpenGL choice for KWin
As KWin indirectly uses Qt's OpenGL through QtQuick we need to ensure
to not mix OpenGL and OpenGLES. So we have to built KWin only against
OpenGL if Qt is built against OpenGL and we have to built KWin only
against GLESv2 if Qt is built against GLESv2.

This means the kwin_gles binary is no more. There is only kwin which
either links GL or GLESv2.
2013-10-14 09:04:03 +02:00
Martin Gräßlin ff6cb5e75c Drop the GlobalShortcutsEditor from libkwineffects
As our need can be satisfied without sub-classing KShortcutsEditor
we can drop this class.
2013-09-09 07:10:08 +02:00
Martin Gräßlin caad13ff95 Use new components based Find XCB 2013-09-09 06:03:35 +02:00
Martin Gräßlin 5e29cc24dc Remove XLib dependency from kwinglobals
As a side effect we need some fixx11h.h includes at places which still
use too much xlib.
2013-09-05 09:56:50 +02:00
Martin Gräßlin 8a78e71c97 Drop KWin::Extensions from kwinglobals
Replaced by KWin::Xcb::Extensions. This removes the remaining
Xlib extension dependencies form kwineffects.
2013-09-05 09:14:09 +02:00
Martin Gräßlin add219d5bc Port libkwinglutils from KDebug to QDebug
And another lib doesn't need kde4support any more.
2013-09-02 11:31:46 +02:00
Martin Gräßlin 99bcac1cc7 Port libkwineffects away from KDebug
And with that it doesn't need kde4support anymore.
2013-09-02 10:43:55 +02:00
Martin Gräßlin 84a2f3020b Use Qt5:: in target link libraries in KWin 2013-08-20 09:14:24 +02:00
Martin Gräßlin 1807265813 KDebug moved to KDE4Support
Adjust target link libraries.
2013-07-31 14:07:58 +02:00
Martin Gräßlin 9ab751042a Drop X11_XCB library dependency
We don't need it anymore - the xcb connection is also provided by
QX11Info.
2013-07-24 09:58:43 +02:00
Martin Gräßlin f04b39c548 Adjust target link libraries 2013-07-24 09:58:42 +02:00
Martin Gräßlin 5a2d14baf7 More fine grained linking than X11_LIBRARIES
Use X11_X11_LIB and actually needed additional libs instead of
everything coming with X11_LIBRARIES.

REVIEW: 109141
2013-03-06 10:14:21 +01:00
Martin Gräßlin 928e5d4912 Split the libs we link to into multiple variables
Using a lib variable for:
* own libs
* qt libs
* kde libs
* xlib libs
* xcb libs

and link those groups together in target_link_libraries. This should
make the code easier to read and easier to support in future for some
time both Qt4 and Qt5.
2013-03-06 10:14:15 +01:00
Martin Gräßlin ea83a9c578 Cmake cleanup: empty endfoo() 2013-03-06 10:14:15 +01:00
Martin Gräßlin 5ea22e362d CMake Cleanup: empty endif 2013-03-06 10:14:15 +01:00
Martin Gräßlin 87b7ae2218 Fix compile error introduced with d6b3f698
I should be more careful when reordering commits in my local branches :-)
2013-02-27 11:55:21 +01:00
Martin Gräßlin f45ade7785 Port preMultiply of color to xcb_render
Method returns a xcb_render_color_t instead of an XRenderColor.

With this change kwinxrenderutils is XLib free!
2013-02-14 14:20:27 +01:00
Martin Gräßlin 368de6842a Wrapper class to create an xcb_xfixes_region_t from a QRegion
Replaces the previously existing method to convert a QRegion which did
not take care of freeing the region again.

Usages are ported over.
2013-02-14 14:20:26 +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
Casian Andrei 01adbe6dc5 Implement color correction (per output)
Add an option to kcmcompositing in the 'Advanced' tab, to enable or
disable color correction. It is specified that it's experimental and it
needs Kolor Manager.

Before painting for a particular screen, ColorCorrection::setupForOutput
should be called.

A screen property is added for WindowPaintData.

In kwinglutils, The fragment shaders are intercepted before being
compiled and they get a couple of lines of code inserted in order to do
the color correction. This happens only when color correction is enabled, of
course.

For D-Bus communication with KolorServer, everything is async.

The implementation basically manages a set of color lookup tables for
different outputs and for different window regions. These are taken via
D-Bus. Each lookup table has around 700 KB.

This commit reintroduces the changes from the former merge with the
"color2" branch. In this form, it can be easily reverted.

REVIEW: 106141
2012-11-13 22:47:09 +02:00
Casian Andrei a46d247702 Revert "Merge branch 'color2'"
This merge is incomplete and it does not include the review number of
the associated review request. It should have been pushed as a single
commit, because the merged commits were not intended to be published in
their form.

This reverts commit dcba90263069a221a5489b1915c5cf1ca39d090c, reversing
changes made to 50ae07525c7fde07794e7548c3d6e5a69cb1a89d.

Conflicts:
	kwin/scene_opengl.cpp
	kwin/scene_opengl.h
2012-11-13 22:19:32 +02:00
Kai-Uwe Behrmann 479be668d7 Merge branch 'color2'
Conflicts:
	kwin/libkwineffects/kwinglplatform.cpp
2012-11-07 23:54:18 +01:00
Christophe Giboudeaux 007733f14a Fix include 2012-10-29 17:20:19 +01:00
Martin Gräßlin cf5de22586 Introduce a build option KWIN_BUILD_OPENGL_1_COMPOSITING
If the build option is enabled KWIN_HAVE_OPENGL_1 is passed as a compile
flag when build against OpenGL.

This compile flag is meant to replace the KWIN_HAVE_OPENGLES. So far code
has been ifdefed for special behavior of OpenGL ES 2.0 and to remove
fixed functionality calls which are not available in OpenGL ES 2.0.

With this build flag the fixed functionality calls which are only used in
the OpenGL1 Compositor can be removed and keeping the KWIN_HAVE_OPENGLES
for the real differences between OpenGL 2.x and OpenGL ES 2.0.

E.g. a call like glColor4f should be in an
glColor4f(1.0, 1.0, 1.0, 1.0);

while a call like glPolygonMode should be in an
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);

Building for OpenGL ES 2.0 of course implies that KWIN_HAVE_OPENGL_1 is
not defined.
2012-10-25 11:34:12 +02:00
Martin Gräßlin a401558a43 Provide OpenGL over Egl
The Egl backend is decoupled from the OpenGL ES build option which makes
it possible to use it as a replacement for glx.

To make this possible a new build flag is added when egl is available at
compile time and any egl specific code is now ifdefed with this flag
instead of the gles flag. In addition at runtime a windowing system enum
value is passed to the various detect methods to have egl/glx specific
detection for e.g. function pointer resolving.

By default egl is used if compiled with OpenGL ES, otherwise glx is used.
But in the non-gles case the windowing system can be selected through the
new environment variable KWIN_OPENGL_INTERFACE. Setting this variable to
"egl" the EglOnXBackend is used.

REVIEW: 106632
2012-10-04 17:17:01 +02:00