Commit Graph

379 Commits (1c8233ad6dc55a2de55eed1db3412171ddd5d2eb)

Author SHA1 Message Date
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
Eike Hein fbc957c048 Second 'unbreak kwin build' of the day ...
Port from kFatal to qFatal - kFatal is still in kde4support,
but lacking debug area support arguably isn't that big a
deal since fatals can't be turned off anyway.

CCMAIL:mgraesslin@kde.org
2013-09-02 18:42:20 +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 16df417cc6 XCB variant for displayWidth/Height and update after RandR event
DisplayWidth and height provide proper values though internally
things are wrong as QDesktopWidget seems to not emit the signal.
2013-09-02 10:23:30 +02:00
Martin Gräßlin 37334f400a Drop no longer needed XLib includes from KWin 2013-08-20 10:29:20 +02:00
Martin Gräßlin 84a2f3020b Use Qt5:: in target link libraries in KWin 2013-08-20 09:14:24 +02:00
Anselmo L. S. Melo 49c04f13b1 Porting libkwineffects to Qt5/KF5: QStandardPaths
REVIEW: 111976
2013-08-13 17:55:57 -03:00
Martin Gräßlin 388944314a Drop QPixmap ctor of XRenderPicture
Was a todo to remove it as it's just using a toImage. Removing this
ctor should make it for the user more obvious that put image is used.
2013-08-13 09:57:50 +02:00
Sebastian Kügler 08a53e6a11 Remove K_EXPORT_PLUGIN macros
Include .moc file in configs_builtins.cpp, and reenable the build of the
configs.

REVIEW:111940
2013-08-08 13:47:25 +02:00
Martin Gräßlin 9291b18cee Merge branch 'master' into frameworks-scratch
Conflicts:
	CMakeLists.txt
	kwin/effects.cpp
	kwin/effects/logout/logout.cpp
	kwin/effects/presentwindows/main.qml
	kwin/effects/presentwindows/presentwindows.cpp
	kwin/effects/presentwindows/presentwindows.h
	kwin/effects/zoom/zoom_config.cpp
	kwin/libkwineffects/kwinglutils_funcs.cpp
	kwin/libkwineffects/kwinxrenderutils.cpp
	kwin/nvidiahack.cpp
	kwin/xcbutils.h
	plasma/desktop/containments/desktop/plasma-containment-desktop.desktop
	plasma/generic/wallpapers/image/image.cpp
	plasma/generic/wallpapers/image/plasma-wallpaper-image.desktop
2013-08-07 10:10:06 +02:00
Thomas Lübking b92ebe02aa add synthetic repaint after crossfade finished
prevents glitches after crossfading translucent window

REVIEW: 111888
2013-08-06 09:12:05 +02:00
Thomas Lübking e9e73f1134 add XRenderPicture(QImage) constructor
was implicitly present for QPixmap::toImage

REVIEW: 111878
2013-08-05 20:43:28 +02:00
Martin Gräßlin 469828c847 Cache display and rootWindow
No need to go through the QPA interface each time we access the
Display variable or need the root window.
2013-08-02 08:31:53 +02:00
Martin Gräßlin 1807265813 KDebug moved to KDE4Support
Adjust target link libraries.
2013-07-31 14:07:58 +02:00
Casian Andrei 4d24fe8b30 Fix many color correction problems with OpenGL ES
On GLES, check for OES_texture_3D extension for color correction

Remove a block of ugly hack code that was supposedly needed to build
with OpenGL ES.

Convert the lookup texture data to uint8 on OpenGL ES before sending it
via glTexImage3D, because uint16 is not supported.

Check if the shaders have been reinitialized successfuly when trying to
activate color correction, prevent black screens when there are issues
with the shaders.

BUG: 315419
REVIEW: 111225
(cherry picked from commit 68c68ee3c2b54f968c4d8275f1e8a2e0ccc90dd7)
2013-07-28 17:44:06 +03: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 202bc2fbf9 Fix include path to 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 e32635fb2e QMatrix4x4 does no longer wrap qreal 2013-07-24 09:58:41 +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 8dd61fdc53 Introduce a define to mark code areas which need porting 2013-07-24 09:47:02 +02:00
Martin Gräßlin 1d2c2d5982 Use Q_SLOTS and Q_SIGNALS instead of slots and signals
Fixes compilation with Qt5/KF5 setup.
2013-07-24 09:46:54 +02:00
Martin Gräßlin 2f9ff5591c Drop support for native graphics system
Qt 5 only supports raster which means our pixmaps are always non native,
so we don't need the Extension information any more and can drop all
special code handling for mapping a native QPixmap to an X11 pixmap.
2013-07-24 09:46:54 +02:00
Fredrik Höglund 4b120288b6 kwin: Use glBufferSubData() when preferred
Use glBufferData() to reallocate the data store, and glBufferSubData()
to upload data to unused ranges of vertex buffers.
2013-07-08 01:23:38 +02:00
Fredrik Höglund 9de4c490ba kwin: Add GLPlatform::preferBufferSubData()
This method returns true when glMapBufferRange() is likely to perform
worse than glBufferSubData() when updating an unused range in a buffer
object.

This is the case with the NVIDIA driver, where glMapBufferRange()
will force thread serialization. The driver tracks which ranges of
the buffer are in use, so calls to glBufferSubData() should not
cause a pipeline stall.
2013-07-08 01:23:37 +02:00
Fredrik Höglund 6562fcc665 kwin: Don't query GL_VIEWPORT in pushRenderTarget()
Assume that the default framebuffer has the same dimensions as the screen.

By not quering the dimensions of the viewport we don't risk serialization
in drivers that use threaded dispatch.
2013-06-27 00:06:54 +02:00
Fredrik Höglund 7124f5190b Revert "kwin: Make WindowQuadList inherit from QVector"
This reverts commit 23dff966437bb664a2ffdb3f7957ef39978f5fad.

Using QVector is not a win when effects such as wobbly windows are
active, due to the realloc overhead. So revert this change for now.
2013-06-27 00:06:49 +02:00
Martin Gräßlin db2e6687e1 Remove dead assignment in GLVertexBuffer::draw
Variable primitiveMode is not read in the branch and there's a return in
the same branch.

REVIEW: 111192
2013-06-26 17:58:48 +02:00
Thomas Lübking e717c131bf Hook modalChanged signal for DialogParent script
Eg. gtk+ alters the modality after mapping and
before unmapping the window.
Therfore the former implementation ahd a wrong idea
about the modality until the window was activated and
again had a wrong idea when the dialog closed, keeping
the main client dimmed.

Modality changes at runtime are uncommon but legal and can
happen anytime.

BUG: 321340
FIXED-IN: 4.11
REVIEW: 111154
2013-06-26 12:42:09 +02:00
Aurélien Gâteau 4a426d731d kwin: Fix build on arm
CCMAIL: ubuntu@kitterman.com
2013-06-26 10:13:33 +02:00
Casian Andrei 8f92e2ab91 Avoid calling expensive GLShader::setUniform overload
REVIEW: 111196
2013-06-24 21:34:32 +03:00
Casian Andrei 40acb1da14 Remove unnecessary checkGLError() calls from color correction
Keep only the ones that should only be called once

REVIEW: 111060
2013-06-24 21:33:56 +03:00
Casian Andrei 79c35d0164 Enable color correction only after successfuly contacting KolorManager
Prevents the possiblity of using shaders modified for color correction
without valid data from KolorManager. If that happened, everthing
blacked out.

Now the color correction shaders are enabled only after successfuly
contacting KolorManager.

The issue was highlighted after ab7e228d.

BUG: 321217
2013-06-18 17:27:34 +03:00
Fredrik Höglund 2fc2004119 kwin: Reset the dirty flags in GLTexture
m_wrapModeChanged and m_filterChanged were never set to false,
causing the sampler parameters to be set every time a texture was bound.
2013-06-13 18:46:34 +02:00
Fredrik Höglund 9d03e16c34 kwin: Check that color correction is enabled in setupForOutput()
Return early if color correction is disabled, so this function
becomes a no-op in that case.
2013-06-11 23:28:48 +02:00
Fredrik Höglund 15dae59999 kwin: add a GLVertexBuffer::draw() overload
This overload doesn't take a clip region. Added for symmetry
with the render() method.
2013-06-11 05:11:41 +02:00
Thomas Lübking 88be3d0caf ensure to init animationeffect bindings
it seems an animation can be triggered and the resp.
window deleted in the first event cycle (before the deleted
signal is bound) - so we add an initialization flag to ensure
the binding happens before the first animation is added

BUG: 320562
FIXED-IN: 4.11
REVIEW: 110872
2013-06-10 16:38:03 +02:00
Martin Gräßlin 5660801192 Add DecorationOpacity to AnimationEffect
Just like Opacity for transforming only the decoration opacity.

It's an ABI break as the new enum value had to be included as anonther
non-float base value.
2013-06-05 08:27:09 +02:00
Martin Gräßlin 941c02a60f Introduce cross-fading with previous pixmap
Cross fading with previous pixmap is achieved by referencing the old
window pixmap. WindowPaintData has a cross-fade-factor which interpolates
between 0.0 (completely old pixmap) to 1.0 (completely new pixmap).

If a cross fading factor is set and a previous pixmap is valid this one
is rendered on top of the current pixmap with opacity adjusted. This
results in a smoother fading.

To simplify the setup the AnimationEffect is extended and also takes care
about correctly (un)referencing the previous window pixmap. The maximize
effect is adjusted to make use of this new capabilities.

Unfortunately this setup has a huge problem with the case that the window
decoration gets smaller (e.g. from normal to maximized state). In this
situation it can happen that the old window is rendered with parts outside
the content resulting in video garbage being shown. To prevent this a set
of new WindowQuads is generated with normalized texture coordinates in
the safe area which contains real content.

For OpenGL2Window a PreviousContentLeaf is added which is only set up in
case the crass fading factor is set.

REVIEW: 110578
2013-06-05 08:18:28 +02:00
Fredrik Höglund 40918e0193 kwin: Make WindowQuadList inherit from QVector
This avoids the overhead of allocating each WindowQuad on the heap
when appending items to the list, and also ensures that the quads
are continuous in memory.
2013-06-05 00:43:17 +02:00
Fredrik Höglund dbbda21129 kwin: Support quads in makeInterleavedArrays()
A new type parameter is added for specifying the primitive type.
2013-06-05 00:41:24 +02:00
Fredrik Höglund 7e22bd314c kwin: Add support for rendering quads using an index buffer
This reduces the size of the geometry that needs to be uploaded by
one-third, and allows kwin to take advantage of the post-transform
cache in the GPU.
2013-06-05 00:41:24 +02:00
Fredrik Höglund 479ea5db61 kwin: Resolve functions for GL_ARB_copy_buffer 2013-06-05 00:41:24 +02:00
Fredrik Höglund 5e7b2a34a8 kwin: Resolve functions for GL_ARB_draw_elements_base_vertex 2013-06-05 00:41:23 +02:00
Fredrik Höglund 993b50cf1c kwin: Add a new GLVertexBuffer::draw() method
Expose bindArrays(), unbindArrays() and add a draw() method that takes
an offset and a count. This makes it possible to upload geometry, call
bindArrays(), and then call draw() multiple times to draw different
subsets of the uploaded geometry.
2013-06-05 00:41:23 +02:00
Fredrik Höglund ac5f1317e9 kwin: Split WindowQuadDecoration into two types
Split WindowQuadDecoration into WindowQuadDecorationLeftRight
and WindowQuadDecorationTopBottom.

This simplifies the code in SceneOpenGL::Window::paintDecoration().
2013-06-05 00:41:22 +02:00
Martin Gräßlin 4b4646973b Use QList<KWin::EffectWindow*> as return type for mainWindows()
QtScript bindings fails when using EffectWindowList.
2013-06-04 17:17:08 +02:00