The ShaderBinder class can be used for the case that a block of code
should be executed with a given Shader being bound. This is useful for
all the cases where there is a if-block for OpenGL2 execution with a
Shader being pushed in the first line to the ShaderManager and popped in
the last line of the block. With the helper this can be simplified to:
ShaderBinder binder(myCustomShader);
or
ShaderBinder binder(ShaderManager::GenericShader);
The ctor of ShaderBinder pushes the given Shader to the stack and once
the helper goes out of scope it will be popped again from the stack.
In addition the helper can take care of OpenGL 1 compositing, that is it
just does nothing. So it can also be used where there is a shared OpenGL1
and OpenGL2 code path where the Shader should only be pushed in OpenGL2.
This basically removes all the checks for the compositing type before
pushing/popping a Shader to the stack.
REVIEW: 106521
The main usage of ShaderManager::isValid was to have OpenGL2 specific
code pathes. Now we have an actual OpenGL2Compositing type and we know
that the ShaderManager is valid if we have this compositing type and we
know that it is not valid on OpenGL1Compositing. This gives us a much
better check and allows us to use the isValid method just for where we
want to check whether the shaders compiled successfully.
In addition some effects require OpenGL2, so we do not need to check
again that the ShaderManager is valid. Such usages are removed.
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.
This makes kwin in OpenGL2 mode more coherent with kwin_gles.
Despite some fullscreen effects they should now make the same
(pure) OpenGL calls.
REVIEW: 103804
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.
The vertex buffer implementation uses the shader manager to decide
whether core painting should be used or not. Shader manager is only
used by shaders using vertex attributes instead of gl_Vertex etc.
svn path=/trunk/KDE/kdebase/workspace/; revision=1213663
The following changes were in SVN, but were removed from git:
M wallpapers/Air/metadata.desktop
M wallpapers/Autumn/metadata.desktop
M wallpapers/Blue_Wood/metadata.desktop
M wallpapers/Grass/metadata.desktop
M wallpapers/Hanami/metadata.desktop
M wallpapers/Horos/metadata.desktop
M wallpapers/Media_Life/metadata.desktop
M wallpapers/Plasmalicious/metadata.desktop
M wallpapers/Quadros/metadata.desktop
svn path=/trunk/KDE/kdebase/workspace/; revision=1207957
The following changes were in SVN, but were removed from git:
M wallpapers/Autumn/metadata.desktop
M wallpapers/Blue_Wood/metadata.desktop
M wallpapers/Grass/metadata.desktop
M wallpapers/Hanami/metadata.desktop
M wallpapers/Horos/metadata.desktop
svn path=/trunk/KDE/kdebase/workspace/; revision=1191511
The following changes were in SVN, but were removed from git:
M wallpapers/Aghi/metadata.desktop
M wallpapers/Air/metadata.desktop
M wallpapers/Autumn/metadata.desktop
M wallpapers/Blue_Wood/metadata.desktop
M wallpapers/Ethais/metadata.desktop
M wallpapers/Evening/metadata.desktop
M wallpapers/Fields_of_Peace/metadata.desktop
M wallpapers/Finally_Summer_in_Germany/metadata.desktop
M wallpapers/Fresh_Morning/metadata.desktop
M wallpapers/Grass/metadata.desktop
M wallpapers/Hanami/metadata.desktop
M wallpapers/Media_Life/metadata.desktop
M wallpapers/Plasmalicious/metadata.desktop
M wallpapers/Quadros/metadata.desktop
M wallpapers/Red_Leaf/metadata.desktop
svn path=/trunk/KDE/kdebase/workspace/; revision=1177799
The following changes were in SVN, but were removed from git:
M wallpapers/Blue_Wood/metadata.desktop
M wallpapers/Ethais/metadata.desktop
M wallpapers/Fields_of_Peace/metadata.desktop
M wallpapers/Finally_Summer_in_Germany/metadata.desktop
M wallpapers/Grass/metadata.desktop
M wallpapers/Media_Life/metadata.desktop
M wallpapers/Quadros/metadata.desktop
svn path=/trunk/KDE/kdebase/workspace/; revision=1155392
The following changes were in SVN, but were removed from git:
M wallpapers/Autumn/metadata.desktop
M wallpapers/Blue_Wood/metadata.desktop
M wallpapers/Grass/metadata.desktop
M wallpapers/Hanami/metadata.desktop
svn path=/trunk/KDE/kdebase/workspace/; revision=1098905
The following changes were in SVN, but were removed from git:
M wallpapers/Aghi/metadata.desktop
M wallpapers/Code_Poets_Dream/metadata.desktop
M wallpapers/Curls_on_Green/metadata.desktop
M wallpapers/Ethais/metadata.desktop
M wallpapers/Evening/metadata.desktop
M wallpapers/Fields_of_Peace/metadata.desktop
M wallpapers/Finally_Summer_in_Germany/metadata.desktop
M wallpapers/Fresh_Morning/metadata.desktop
M wallpapers/Media_Life/metadata.desktop
M wallpapers/Plasmalicious/metadata.desktop
M wallpapers/Quadros/metadata.desktop
M wallpapers/Red_Leaf/metadata.desktop
M wallpapers/Spring_Sunray/metadata.desktop
M wallpapers/The_Rings_of_Saturn/metadata.desktop
svn path=/trunk/KDE/kdebase/workspace/; revision=1097842
The following changes were in SVN, but were removed from git:
M wallpapers/Aghi/metadata.desktop
M wallpapers/Air/metadata.desktop
M wallpapers/Code_Poets_Dream/metadata.desktop
M wallpapers/Curls_on_Green/metadata.desktop
M wallpapers/Ethais/metadata.desktop
M wallpapers/Evening/metadata.desktop
M wallpapers/Fields_of_Peace/metadata.desktop
M wallpapers/Finally_Summer_in_Germany/metadata.desktop
M wallpapers/Fresh_Morning/metadata.desktop
M wallpapers/Media_Life/metadata.desktop
M wallpapers/Plasmalicious/metadata.desktop
M wallpapers/Quadros/metadata.desktop
M wallpapers/Red_Leaf/metadata.desktop
M wallpapers/Spring_Sunray/metadata.desktop
M wallpapers/The_Rings_of_Saturn/metadata.desktop
svn path=/trunk/KDE/kdebase/workspace/; revision=1085566
The following changes were in SVN, but were removed from git:
M wallpapers/Aghi/metadata.desktop
M wallpapers/Air/metadata.desktop
M wallpapers/Code_Poets_Dream/metadata.desktop
M wallpapers/Curls_on_Green/metadata.desktop
M wallpapers/Ethais/metadata.desktop
M wallpapers/Evening/metadata.desktop
M wallpapers/Finally_Summer_in_Germany/metadata.desktop
M wallpapers/Fresh_Morning/metadata.desktop
M wallpapers/Media_Life/metadata.desktop
M wallpapers/Plasmalicious/metadata.desktop
M wallpapers/Quadros/metadata.desktop
M wallpapers/Spring_Sunray/metadata.desktop
M wallpapers/The_Rings_of_Saturn/metadata.desktop
svn path=/trunk/KDE/kdebase/workspace/; revision=1068486
The following changes were in SVN, but were removed from git:
M wallpapers/Aghi/metadata.desktop
M wallpapers/Air/metadata.desktop
M wallpapers/Curls_on_Green/metadata.desktop
M wallpapers/Evening/metadata.desktop
M wallpapers/Fields_of_Peace/metadata.desktop
M wallpapers/Finally_Summer_in_Germany/metadata.desktop
M wallpapers/Fresh_Morning/metadata.desktop
M wallpapers/Media_Life/metadata.desktop
M wallpapers/Plasmalicious/metadata.desktop
M wallpapers/Quadros/metadata.desktop
M wallpapers/Red_Leaf/metadata.desktop
M wallpapers/Spring_Sunray/metadata.desktop
M wallpapers/The_Rings_of_Saturn/metadata.desktop
M wallpapers/There_is_Rain_on_the_Table/metadata.desktop
svn path=/trunk/KDE/kdebase/workspace/; revision=1068118
The following changes were in SVN, but were removed from git:
M wallpapers/Aghi/metadata.desktop
M wallpapers/Air/metadata.desktop
M wallpapers/Code_Poets_Dream/metadata.desktop
M wallpapers/Curls_on_Green/metadata.desktop
M wallpapers/Evening/metadata.desktop
M wallpapers/Fields_of_Peace/metadata.desktop
M wallpapers/Finally_Summer_in_Germany/metadata.desktop
M wallpapers/Fresh_Morning/metadata.desktop
M wallpapers/Media_Life/metadata.desktop
M wallpapers/Plasmalicious/metadata.desktop
M wallpapers/Red_Leaf/metadata.desktop
M wallpapers/Spring_Sunray/metadata.desktop
M wallpapers/The_Rings_of_Saturn/metadata.desktop
M wallpapers/There_is_Rain_on_the_Table/metadata.desktop
svn path=/trunk/KDE/kdebase/workspace/; revision=1060615
The following changes were in SVN, but were removed from git:
M wallpapers/Atra_Dot/metadata.desktop
svn path=/trunk/KDE/kdebase/workspace/; revision=1060237
The following changes were in SVN, but were removed from git:
M wallpapers/Aghi/metadata.desktop
M wallpapers/Air/metadata.desktop
M wallpapers/Evening/metadata.desktop
M wallpapers/Plasmalicious/metadata.desktop
M wallpapers/Spring_Sunray/metadata.desktop
M wallpapers/The_Rings_of_Saturn/metadata.desktop
svn path=/trunk/KDE/kdebase/workspace/; revision=1045140
The following changes were in SVN, but were removed from git:
M wallpapers/Aghi/metadata.desktop
M wallpapers/Evening/metadata.desktop
M wallpapers/Plasmalicious/metadata.desktop
M wallpapers/Spring_Sunray/metadata.desktop
M wallpapers/The_Rings_of_Saturn/metadata.desktop
svn path=/trunk/KDE/kdebase/workspace/; revision=1029207
The following changes were in SVN, but were removed from git:
M wallpapers/Aghi/metadata.desktop
M wallpapers/Atra_Dot/metadata.desktop
M wallpapers/Evening/metadata.desktop
M wallpapers/Spring_Sunray/metadata.desktop
M wallpapers/The_Rings_of_Saturn/metadata.desktop