If a section of comments consists of a list of links and all are broken
it's a sign that nobody has used these comments for a long time...
REVIEW: 107933
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
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
A decoration can provide the AbilityAnnounceAlphaChannel in addition to
AbilityUsesAlphaChannel. If this ability is provided the decoration can
enable/disable the use of the alpha channel through setAlphaEnabled().
The base idea behind this mechanism is to be able to tell the compositor
that currently alpha is not needed. An example is the maximized state in
which the decoration is fully opaque so that there is no need to use the
translucency code path which would render all windows behind the deco.
In addition also the blur effect honors this setting so that behind a
known opaque decoration no blurring is performed.
Oxygen is adjusted to disable translucency in maximized state and Aurorae
is adjusted to allow themes to enable/disable translucency. For Plastik
translucency and with that also blurring is disabled.
REVIEW: 106810
Results in cleaner changes.
Put all the color correction stuff from SceneOpenGL in SceneOpenGL2.
Conflicts:
kwin/eglonxbackend.cpp
kwin/glxbackend.cpp
kwin/scene.h
kwin/scene_opengl.cpp
kwin/scene_opengl.h
Replace dynamic_casts to check the type for for Toplevel by isFoo()
calls and use static_casts in such blocks.
Furthermore method shape() returns now a constant reference instead of a
copy of the QRegion.
REVIEW: 106364
The handling for creating and managing the OpenGL context is
split out of the SceneOpenGL into the abstract OpenGLBackend
and it's two subclasses GlxBackend and EglOnXBackend.
The backends take care of creating the OpenGL context on the
windowing system, e.g. on glx an OpenGL context on the overlay
window is created and in the egl case an EGL context is created.
This means that the SceneOpenGL itself does not have to care
about the specific underlying infrastructure.
Furthermore the backend provides the Textures for the specific
texture from pixmap operations. For that in each of the backend
files an additional subclass of the TexturePrivate is defined.
These subclasses hold the EglImage and GLXPixmap respectively.
The backend is able to create such a private texture and for
that the ctor of the Texture is changed to take the backend as
a parameter and the Scene provides a factory method for
creating Textures. To make this work inside Window the Textures
are now hold as pointers which seems a better choice anyway as
to the member functions pointers are passed.
The Scene has always been created and destroyed inside what is
now the split out compositor. Which means it is actually owned
by the Compositor. The static pointer has never been needed
inside KWin core. Access to the Scene is not required for the
Window Manager. The only real usage is in the EffectsHandlerImpl
and in utils.h to provide a convenient way to figure out whether
compositing is currently active (scene != NULL).
The EffectsHandlerImpl gets also created by the Compositor after
the Scene is created and gets deleted just before the Scene gets
deleted. This allows to inject the Scene into the EffectsHandlerImpl
to resolve the static access in this class.
The convenient way to access the compositing() in utils.h had
to go. To provide the same feature the Compositor provides a
hasScene() access which has the same behavior as the old method.
In order to keep the code changes small in Workspace and Toplevel
a new method compositing() is defined which properly resolves
the state. A disadvantage is that this can no longer be inlined
and consists of several method calls and pointer checks.
The implementation consists of a class in libkwineffects.
There are some slight modifications in the compositor. Regions for
different outputs are drawn at different times.
Currently only per output color correction is implemented. However, the
grounds are prepared for implementing per window color correction
easily.
The ColorCorrection class needs to communicate via D-Bus with a KDED
module, KolorServer, which is a part of KolorManager.
The only visible part for the user consists of a check box in the
advanced tab for the compositing KCM.
The actual correction is done by injecting a piece of code in the
fragment shader, code that does a 3D lookup into a special color lookup
texture. The data for these textures is obtained from KolorServer. All
D-Bus calls are async.
The public member variables for opacity, saturation and brightness
are removed in favor for getter and setters. The variables are
moved into a private class. Those are now qreal instead of double.
To make usage inside the effects easier a multiply method is added
which multiplies the current value with passed in factor and returns
the new value in a functional programming style.
This commit is the top-most of a patch series to refactor
ScreenPaintData and WindowPaintData. Other related commits are:
* 0811772
* ebdc7ec
* 2c8dd8d
* 7699726
* 68e0201
* 611cb09
REVIEW: 105141
BUG: 303314
FIXED-IN: 4.10
Upscaling windows looks really bad. If the thumbnail gets larger
than the window it's better to just use the orignal window size
and have the thumbnail rendered centered in the requested
region.
BUG: 297864
FIXED-IN: 4.9.0
REVIEW: 105459
The LanczosFilter has a FBO in screen size. When the screen
geometry changes this FBO has to be recreated. To go completely
sure the lanczos filter gets deleted on screen changes.
To achieve this the LanczosFilter is wrapped inside a
QWeakPointer so that we can track when it got deleted. This
brings an additional advantage by delaying the creation of the
shader till it is really needed, that is when for the first
time a window thumbnail with lanczos is rendered.
BUG: 296065
FIXED-IN: 4.9.0
REVIEW: 105479
The GraphicsView which renders the ThumbnailItem does not have to be
a toplevel widget. If it has a parent we have to navigate to the top level
parent widget and compare the window Id on this widget. If it matches the
one of the window we are currently rendering, we know that we found the
correct GraphicsView.
Reviewed-By: Philipp Knechtges <philipp-dev@knechtges.com>
Instead of using the scene it is better to use the toplevel
item's parent position. This works better in case the scene
is endless and the toplevel item is not positioned at 0/0 as
it is the case for anything from Plasma.
There are still slight layouting issues which I think is
caused by thumbnails not honouring the margin. Will investigate.
REVIEW: 104395
This patch adds a new function Toplevel::addLayerRepaint, that in contrast
to addWorkspaceRepaint does not invalidate every blur texture cache that
overlaps with that region. As the name suggests it rather invalidates the
to the window associated layer at that position. This is especially useful
in the case of move/resize events in combination with oxygen-transparent,
where the altered window is almost always the topmost window and the blur
texture cache of the windows underneath are unchanged.
For the case of fully opaque windows the behaviour of addLayerRepaint
and addWorkspaceRepaint should be same.
REVIEW: 103906
This patch reduces the number of QRegion and WindowQuadList operations
by drawing the opaque and translucent parts of the window within the
same bottom to top pass.
REVIEW: 103671
By default clip is enabled. This means that if the thumbnail would
overlap the "parent" window, it does not get rendered at all. If set
to false it will always be rendered. This is required for window strip
where the complete screen width is used, so overlap does not matter.
A new QML item "ThumbnailItem" is registered to the TabBox. The
C++ implementation finds the EffectWindow of the TabBox and adds
itself to the EffectWindow.
While rendering the EffectWindow the information for all registered
ThumbnailItems are extracted and the thumbnail is rendered on top
of the EffectWindow.
This has obvious limitations like you cannot put other QML items
on top of the thumbnail. Nevertheless it works well enough to
be a possible replacement for e.g. BoxSwitch effect.
When compositing is disabled an icon is rendered instead of the
Thumbnail.
One TabBox Layout inspired by BoxSwitch Effect is added. For the
KCM small pre-rendered items are used.
REVIEW: 103039
QElapsedTimer doesn't have a constructor that initializes the
private members. This means that calls to isValid() will depend
on uninitialized data when the timer has never been started.
elapsed() and restart() will also use and return values
computed from uninitialized data.
This fixes several valgrind errors.
This patch implements an XProperty named _KDE_NET_WM_OPAQUE_REGION
which gives the compositor the information which part of a window
is opaque although it is an ARGB visual. The basic ideas are from
http://www.mail-archive.com/wm-spec-list@gnome.org/msg00715.html
Additionally the patch makes kwin use this information to do a better
clipping in Scene::paintSimpleScreen which should result in a higher
performance.
REVIEW: 102933
Instead of calculating the elapsed time from epoch clock, using
a QElapsedTimer as well as reusing the timer object instead of
creating a new one in the scene each frame.
REVIEW: 102473