The CompositingType enum turns into flags and two new values are
introduced: OpenGL1Compositing and OpenGL2Compositing.
Those new values are or-ed to OpenGLCompositing so that a simple check
for the flag OpenGLCompositing works in case of one of those two new
values. To make the generic check for OpenGL compositing easier a method
in EffectsHandler is introduced to just check for this.
The scenes now return either OpenGL1Compositing or OpenGL2Compositing
depending on which Scene implementation. None returns OpenGLCompositing.
The Oxygen deco uses this to remove built-in shadows from decorated windows when adding (legacy...) decoration shadows
CCBUG: 291774
REVIEW: 103751
(cherry picked from commit a97bdc64fa2a676f99738abd371a99126fb8e93d)
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.
Copies the shadow parts into one image and creates a GLTexture
from the image, so that we can render the complete shadow with
just one texture and one painting pass.
Should remove most of the overhead involved when rendering the new Shadows.
As a side effect this should fix missing shadows with non-NPOT GPUs and
a rendering glitch reported with NVIDIA.
REVIEW: 101742
The deep copy does not work with raster as it creates a non-native
pixmap. In fact the deep copy is not needed any more as it was a
safety check during development when apps using raster could crash
kwin.
In order to notice when the geometry changes a new signal is
added to toplevel and both Unmanaged and Client connect all their
signals which are emitted whenever the geometry changes in some way
to this new signal.
Shadow connects to the signal and updates the quads and region
whenever the size changes.
The Shadow is clearly an aspect of the compositor. Therefore the
Shadow has to be owned and controlled by the Scene::Window.
Nevertheless Toplevel needs to know about the Shadow cause of reading
the property.
Unmanaged needs to repaint the complete geometry including shadow
when it ends compositing. Therefore we need to track the shadow
passing to deleted correctly. Disadvantage: when turning off
compositing the shadow is kept. Need to solve in a better way!
For a complete documentation of new functionality refer to:
http://community.kde.org/KWin/Shadow
The current implementation includes a new Shadow class and Toplevel
holds a pointer to an instance of this class. The Shadow class reads
the data from the X11 Property. There is one extended class located
in SceneOpenGL to render the shadow.
Compositor is adjusted to include the shadow region into the painting
passes.
Implementation for XRender still missing and Shadow needs to respond
to size changes of the Toplevel to update cached shadow region and
WindowQuads.