Commit Graph

106 Commits (c094c7e7cd26ae7622b6e05db932e1d438d6ce1b)

Author SHA1 Message Date
Martin Gräßlin 466bef3a6d Adding a DesktopThumbnailItem declarative item
Similar to WindowThumbnailItem for rendering a desktop thumbnail.
Uses the new paintDesktop hook.

FEATURE: 296067
FIXED-IN: 4.11.0
REVIEW: 104441
2013-04-24 11:45:47 +02:00
Thomas Lübking 9aef5b85a0 support a permanent glSwapBuffer
either by
- forcing fullrepaints unconditionally
- turning a repaint to a full one beyond a threshhold
- completing the the backbuffer from the frontbuffer after the paint

BUG: 307965
FIXED-IN: 4.10
REVIEW: 107198
2013-03-05 19:24:30 +01:00
Martin Gräßlin 533d57da60 Mark most ctors as explicit as reported by Krazy2 checker 2013-01-02 18:35:46 +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
Casian Andrei 8341d4406b Merge remote-tracking branch 'origin/master' into color2
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
2012-09-23 11:57:38 +03:00
Martin Gräßlin 22dd2ca2c9 Merge branch 'KDE/4.9'
Conflicts:
	plasma/generic/scriptengines/python/plasma_importer.py
2012-09-16 21:34:04 +02:00
Martin Gräßlin 967be8b95a Improve performance of Scene::Window
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
2012-09-16 21:31:20 +02:00
Martin Gräßlin 6152cc4fa5 Split out the windowing system related part of SceneOpenGL
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.
2012-09-16 21:28:05 +02:00
Casian Andrei 59d2fa7a10 Merge branch 'master' into color2
Conflicts:
	kwin/scene_opengl.cpp
	kwin/workspace.cpp
2012-09-04 21:55:21 +03:00
Thomas Lübking ad2059bdbe fix flicker with fullscreen effects
BUG: 304375
FIXED-IN: 4.9.1
REVIEW: 106142
2012-08-28 21:29:12 +02:00
Thomas Lübking f82fffdd71 fix flicker with fullscreen effects
BUG: 304375
FIXED-IN: 4.9.1
REVIEW: 106142
2012-08-28 15:35:35 +02:00
Casian Andrei 1fbb413daf CC: Tweak lanczos filter member 2012-08-27 15:53:40 +03:00
Martin Gräßlin 2d954a6bf3 Make the Scene owned by the Compositor
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.
2012-08-26 20:43:57 +02:00
Casian Andrei a417888b0e Implement color correction support
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.
2012-08-20 20:37:25 +03:00
Martin Gräßlin 3746e4d7d8 Recreate lanczos filter whenever the screen size changes
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
2012-07-09 06:32:57 +02:00
Thomas Lübking fc665106c9 Swap vsync order, trade in 1frame lag
REVIEW: 103058
2012-05-17 11:41:26 +02:00
Montel Laurent 329bd03f6b Fix warning 2012-03-02 14:03:05 +01:00
Thomas Lübking 85635dd485 fix tabbing
BUG: 290959
BUG: 265160
BUG: 229292
BUG: 238279
BUG: 290758
BUG: 222831
BUG: 278275
BUG: 245747
BUG: 230000

BUG: 253697
BUG: 230570
BUG: 265977
BUG: 225337
BUG: 225339

REVIEW: 103855
2012-02-11 16:30:22 +01:00
Thomas Lübking bf88ec09ac Revert "fix tabbing"
pushed out of branch, not master - leading to absent revision, found hash collision??

This reverts commit 94b2ad7b85801e37e2df4671cdc4f26b6d7e5506.
2012-02-11 16:29:14 +01:00
Thomas Lübking d245035a17 fix tabbing
BUG: 290959
BUG: 265160
BUG: 229292
BUG: 238279
BUG: 290758
BUG: 222831
BUG: 278275
BUG: 245747
BUG: 230000

BUG: 253697
BUG: 230570
BUG: 265977
BUG: 225337
BUG: 225339

REVIEW: 103855
2012-02-11 16:01:41 +01:00
Philipp Knechtges ba39d1f917 kwin:remove PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS_WITHOUT_FULL_REPAINTS
paintSimpleScreen can handle the affected effects now.

REVIEW: 103827
2012-02-09 14:52:25 +01:00
Thomas Lübking d845b60c6c change geometry w/o compositor restart
This possibly fails on some (older?) ati chip/driver combos
-> Waiting for bugreports

REVIEW: 103246
2012-01-24 22:27:15 +01:00
Philipp Knechtges 050d991cb1 kwin: simplifying paintSimpleScreen
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
2012-01-11 18:04:28 +01:00
Fredrik Höglund eb9988b788 kwin: Make Scene::m_renderTimer a non-member
It's only used in Scene::paint(), and its value is not valid
between calls.
2011-10-29 17:41:16 +02:00
Martin Gräßlin 6e15c0c208 Change timers to QElapsedTimers
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
2011-08-29 06:48:44 +02:00
Philipp Knechtges 85c5181a81 kwin: Avoid painting damaged areas which are occluded by another opaque window.
So far we have not used the information that damage events are window-specific, resulting in the
behavior that we repainted the damaged area although it might be hidden behind another window.
E.g. the CPU-Monitor plasmoid is almost all day occluded by a browser etc. and before this patch
we have been repainting the appropiate area every time the plasmoid has been updated.

Thx to Thomas Lübking for optimizing the patch.

REVIEW: 101846
2011-07-11 19:35:29 +02:00
Arthur Arlt d8072be54d Move OverlayWindow from Workspace to its own class
All the functionality of Overlay Window is moved to its own class
OverlayWindow. It is created and owned by class Scene, since almost
all function calls are called from this class.

REVIEW: 101866
2011-07-09 19:08:48 +02:00
Arthur Arlt 859dacb8b5 Make Scene::windowClosed() a Q_SLOT
This commit just makes the declaration of windowClosed() in Class Scene be a Q_SLOT.
The inheriting classes SceneOpenGL and SceneXRender are updated as well.
2011-07-05 11:46:13 +02:00
Arthur Arlt 14af45cc04 Make Q slots public in class Scene
This commit just makes the slots public that are used in Scene class and its inheriting subclasses.
2011-07-05 11:34:12 +02:00
Arthur Arlt b63c9c1af8 Make mothod windowGeometryShapeChanged() a slot
The method windowGeometryShapeChanged() from the class Scene is now a slot. It is now connected to the signal geometryShapeChanged() which is sent from Toplevel instances Client and Unmanaged.
All direct method calls were deleted.
2011-07-05 11:34:12 +02:00
Arthur Arlt 59a8aac752 Make windowOpacityChanged() a slot
The method windowOpacityChanged is now a protected slot in class Scene. The implementations in the subclasses SceneOpenGL and SceneXRender are the same. The slots are connected to the singal opacityChanged() from Toplevel. The connection is done in the method windowAdded() in both SceneOpenGL and SceneXRender.
2011-07-05 11:34:12 +02:00
Arthur Arlt d88cb00b0b Make class Scene inherit from QObject
The class Scene now inherits from QObject and has the Q_OBJECT macro. The inheriting classes SceneOpenGL and SceneXRender are provided with the Q_OBJECT macro. Now it is possible to use signals and slots and replace direct method calls.
2011-07-05 11:34:12 +02:00
Martin Gräßlin 6cfdbfe1dc Remove compositing self-check
Removes the last bits of the self-check at compositing startup.
It seems like they were only added to XRender because they were
in OpenGL and there they are not available for quite some time.

Also removes the now obsolete disable functionality checks from UI.

REVIEW: 101756
2011-06-26 09:19:22 +02:00
Martin Gräßlin 38e9ab9a4e Move ownership on Shadow from Toplevel to Scene::Window
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.
2011-04-03 11:31:33 +02:00
Martin Gräßlin 0a7e48f7aa KWin uses kdelibs coding style. 2011-01-31 20:07:03 +01:00
Thomas Lübking 337e1eac18 revert vsync strategy, fix timeouts
differecens to patch atteched to 258971:
- removed debug statements
- fixed indention...
- NON vsync strategy does not rely on the estimation, but on the time passed since the last repaint trigger, allowing a precise framerate

CCBUG: 258971


svn path=/trunk/KDE/kdebase/workspace/; revision=1210445
2010-12-31 13:14:11 +00:00
Martin Gräßlin eabad32cfb Add cross fade support for text and icon to EffectFrame.
This allows an effect to fade between old and new text/icon. As an example it's added to CoverSwitch.
Currently only supported in OpenGL. XRender might be added, but I'm missing an idea for an effect to add it.
Most effects using EffectFrame require OpenGL anyway.

svn path=/trunk/KDE/kdebase/workspace/; revision=1160252
2010-08-07 14:08:34 +00:00
Martin Gräßlin 6e31461039 Adding a new rendering flag for painting the screen with transformed windows but without triggering full repaints.
It is not always required to do a full repaint in each frame. E.g. in sliding popups the repaint areas are known and tracked.
This change reduces the painting overhead to just the window area.
Nevertheless I consider this change as experimental and will revert the commit in case it introduces rendering glitches.
Other effects which are good candidates for this flag is wobbly windows, magic lamp, minimize or in general all effects which transform just one window.

svn path=/trunk/KDE/kdebase/workspace/; revision=1158838
2010-08-03 21:33:27 +00:00
Martin Gräßlin ef79d4c443 Use the normal Plasma selection to highlight the selected window in boxswitch.
So it is more consistent (in KDE newspeak "elegant") with other selections and as a plus we get rid of all the custom rendering code in boxswitch.

svn path=/trunk/KDE/kdebase/workspace/; revision=1155051
2010-07-26 20:00:04 +00:00
Martin Gräßlin fa832b7aa7 Cache the icon texture/picture in EffectFrame and use texture from pixmap to load the data in OpenGL mode. Yeah for less pixmap to image to gltexture conversations.
Some effects (boxswitch and flipswitch) still need to be changed to not set the icon in each frame.

svn path=/trunk/KDE/kdebase/workspace/; revision=1152367
2010-07-20 21:11:03 +00:00
Martin Gräßlin e2eebb6503 Refactoring of EffectFrame: EffectFrame becomes an interface just like EffectsHandler and EffectWindow and a concrete EffectFrameImpl in core.
Rendering of the EffectFrame is moved into the scene as Scene::EffectFrame with a concrete implementation in SceneXrender and SceneOpenGL.
A factory method for an EffectFrame is added to the EffectsHandler, which is used by the effects.
Next step: pass the EffectFrame through all effects, so that effects can transform, blur, invert whatever it.

svn path=/trunk/KDE/kdebase/workspace/; revision=1151271
2010-07-18 16:32:37 +00:00
Martin Gräßlin 191435d425 Move Lanczos filter from taskbarthumbnail effect into the scene and use it also in boxswitch, presentwindows and thumbnailaside effects.
svn path=/trunk/KDE/kdebase/workspace/; revision=1133901
2010-06-02 20:04:54 +00:00
Fredrik Höglund e1161c2525 Don't paint windows that are not on the current activity.
svn path=/trunk/KDE/kdebase/workspace/; revision=1127193
2010-05-15 20:18:57 +00:00
Hugo Pereira Da Costa df712a4802 reverting r1121187
on developpers request.
CCBUG: 235821

svn path=/trunk/KDE/kdebase/workspace/; revision=1121252
2010-04-30 23:06:02 +00:00
Hugo Pereira Da Costa 7e28b26173 renamed toplevelDecorationHasAlpha into decorationHasAlpha
svn path=/trunk/KDE/kdebase/workspace/; revision=1121192
2010-04-30 19:13:46 +00:00
Hugo Pereira Da Costa 9f8bbd1d6c Take decorationUseAlpha decoration flag when setting the PAINT_WINDOW_TRANSLUCENT bit mask.
BUG: 235821

svn path=/trunk/KDE/kdebase/workspace/; revision=1121187
2010-04-30 18:34:08 +00:00
Lucas Murray 7d897b7d3f Added PAINT_DISABLED_BY_CLIENT_GROUP. Allow highlighting of inactive tab
windows in box switch.

svn path=/trunk/KDE/kdebase/workspace/; revision=1065321
2009-12-23 01:44:23 +00:00
Fredrik Höglund f81485d868 Fix shaded and shaped windows not being clipped correctly.
BUG: 193808

svn path=/trunk/KDE/kdebase/workspace/; revision=973673
2009-05-27 16:04:58 +00:00
Fredrik Höglund e92aab0518 Implement initial support for ARGB window decorations.
Based on earlier work done by Lubos Lunak and ideas by Lucas Murray.

svn path=/trunk/KDE/kdebase/workspace/; revision=957680
2009-04-22 17:29:56 +00:00