Commit graph

11528 commits

Author SHA1 Message Date
Martin Gräßlin
57eb00977b ScreenEdge helper effect supports QPainter Compositing 2014-01-09 13:29:40 +01:00
Martin Gräßlin
16a82e5fa9 TrackMouse effect supports QPainter compositing 2014-01-09 13:29:40 +01:00
Martin Gräßlin
3776160bb7 ShowPaint effect supports QPainter Compositing 2014-01-09 13:29:40 +01:00
Martin Gräßlin
79358541ea ShowFPS effect supports QPainter Compositing 2014-01-09 13:29:40 +01:00
Martin Gräßlin
dec41bbad8 Make Scene's QPainter available to effects
Effects can access the QPainter used by SceneQPainter to directly render
into the back buffer.

Obviously only available in Compositing Type QPainterCompositing.
2014-01-09 13:29:40 +01:00
Martin Gräßlin
0c559c163d New QPainter based compositor called SceneQPainter
This compositor uses only the QPainter API to perform rendering. The
window's X Pixmap is mapped to a QImage using XShm. As rendering backend
a QImage is used.

The new compositing type "QPainterCompositing" is introduced. Effects
need to be adjusted to explicitly check the compositing type and no
longer assume the compositing type is XRender if it's not OpenGL.

This compositor can be selected with using "Q" as the value for
KWIN_COMPOSE env variable or setting the config value to "QPainter".
The GUI is not yet adjusted to select this compositor.

The QPainter scene provides currently the following features:
* 2D transformations (translation and scalation)
* opacity modifications
* rendering of decorations (new PaintRedirector sub class)
* rendering of shadows
* rendering of effect frames
* rendering to a Wayland surface

The following features are currently not provided:
* saturation changes
* brightness changes
* 3D transformations
* rendering to X Overlay window
* offscreen rendering (e.g. needed for screen shot effect)
* custom rendering in the effects to the current back buffer
2014-01-09 13:29:40 +01:00
Matteo De Carlo
59bb857c7b Replace NULL with nullptr in libkwineffects
Completing the task of replacing all NULL to nullptr in all the files in
libkwineffects folder.
(also substituting some "0" used as nullptr with nullptr)

REVIEW: 114823
2014-01-08 11:55:49 +01:00
Matteo De Carlo
3297655fa2 Replace NULL with nullptr in kwin tests
Completing the task of replacing all NULL to nullptr in all the files in tests folder
(also substituting some "0" used as nullptr with nullptr)

REVIEW: 114822
2014-01-08 11:28:28 +01:00
Matteo De Carlo
aad36da80b Replace NULL with nullptr in kcmkwin
Replacing all NULL to nullptr in all the files in kcmkwin folder
(also substituting some "0" used as nullptr with nullptr)

REVIEW: 114803
2014-01-08 10:30:38 +01:00
Martin Gräßlin
6fce4c2b81 Merge branch 'KDE/4.11'
Conflicts:
	ksmserver/screenlocker/ksldapp.cpp
2014-01-08 10:26:48 +01:00
Martin Gräßlin
59e08896fb Better re-using of Wayland::Buffer
A user can now directly request a Wayland::Buffer object which exposes
the memory address of the shared memory with the wl_buffer. This allows
to use the Wayland Buffer directly as the storage of a QImage.

To make sure that the ShmPool does not reuse such a buffer the Buffer can
be marked as used.

When the ShmPool gets resized the memory addresses become invalid.
Therefore the ShmPool is now a QObject and emits a signal on resized pool
so that every user of a Wayland::Buffer can remap the memory.
2014-01-08 09:22:40 +01:00
Martin Gräßlin
02a01f2006 Wayland backend for the XRender scene
This backend uses an XShm pixmap for the rendering back buffer. In
present() the content of this shm pixmap is copied into a Wayland shm
buffer freeing the pixmap to be used for the next frame again and by that
we have a double buffered rendering.

In opposite to the X11 XRender backend this backend doesn't use the
overlay window.
2014-01-08 09:22:40 +01:00
Martin Gräßlin
b28effff23 A Scene doesn't need to use an X11 Overlay Window
Only the X based Scenes need an overlay window, so the Compositor doesn't
need to check for it in the Wayland case.

OverlayWindow is moved from OpenGLBackend to the sub classes which need
to provide it.
2014-01-08 09:22:40 +01:00
Martin Gräßlin
c9779825d1 Support frame callback in Wayland backend
The egl wayland backend registers for the callback for a rendered frame.
This allows to throttle KWin's compositor so that we don't render frames
which wouldn't end up on the screen.

For this the Scene provides a method to query whether the last frame got
rendered. By default this returns true in all backends. The Egl Wayland
backend returns true or false depending on whether the callback for the
last frame was recieved.

In case the last frame has not been renderd when performCompositing is
tried to be called, the method returns just like in the case when the
overlay window is not visible. Once the frame callback has been recieved
performCompositing is invoked again.
2014-01-08 09:22:40 +01:00
Martin Gräßlin
cfa1ead9e1 Introduce an XRenderBackend similar to OpenGLBackend
An abstract backend is split out of SceneXRender which takes care of
managing the render pictures and swapping them after a frame is rendered.

Having this abstract allows to implement further backends for XRender
which do not use the Overlay Window for compositing.

To have it consistant the SceneXRender is now also created by a factory
method.
2014-01-08 09:22:40 +01:00
Martin Gräßlin
2cf7a4bad3 Provide pixmap format in XShm helper 2014-01-08 09:22:40 +01:00
Martin Gräßlin
f4ee319c6a Move XShm helper class to xcbutils
That way it can be used also in other parts of KWin.
2014-01-08 09:22:40 +01:00
Martin Gräßlin
b7a1f2b3cf Support resizing of Wayland ShmPool
The Wayland::Buffer no longer holds the exact memory address but only
the offset in the pool. The actual address of the pool is only known to
the ShmPool which allows us to remap a resized file.

If a new buffer cannot be provided by the given pool, it gets now resized
to the new needed size. This allows us to only create a very small pool.
2014-01-08 09:22:40 +01:00
Martin Gräßlin
53c09ce7bd Reuse wl_buffer in ShmPool
A new Wayland::Buffer class is provided which wraps a:
* wl_buffer
* size
* stride
* memory address of data represented by the buffer

In addition the Buffer knows whether the compositor has released it or
not. This allows the ShmPool to reuse the buffer in case the same size
and stride is requested.

This is currently most relevant for the CursorData. Instead of keeping
the wl_buffer, the QImage for the cursor is kept and each time the cursor
is set for the surface a new buffer is requested from the ShmPool.

The ShmPool now either reuses an existing buffer or creates a new one.
Furthermore the ShmPool takes care of releasing all buffers at EOL.
2014-01-08 09:22:40 +01:00
Martin Gräßlin
0f09f00210 WaylandBackend becomes a KWin Singleton
The backend gets created by Workspace, but only if the environment
variable WAYLAND_DISPLAY is set.

Because of that the egl wayland backend does no longer create the
backend, but uses the already created one.
2014-01-08 09:22:40 +01:00
Martin Gräßlin
baf477ac00 Split out non-EGL functionality of WaylandBackend into own source files
The functionality to create the connection to a Wayland compositor and
creating a fullscreen surface is moved into wayland_backend.(h|cpp). The
wl_egl_window for the surface is moved into the EglWaylandBackend to have
the actual WaylandBackend free from Egl. This will allow in future to
implement other compositing backends for Wayland which do not use egl.
This means that egl is no longer a build requirement for the wayland
related functionality.
2014-01-08 09:22:40 +01:00
l10n daemon script
723dce4e4c SVN_SILENT made messages (.desktop file) 2014-01-08 06:31:01 +00:00
l10n daemon script
ff562dc8bf SVN_SILENT made messages (.desktop file) 2014-01-08 04:01:27 +00:00
Martin Gräßlin
ef4c32f79a Move Scene::Window handling methods into base class
The pure virtual methods windowAdded, windowClosed, windowDeleted and
windowGeometryShapeChanged had identical implementations in both XRender
and OpenGL scene. They were accessing the hash with Scene::Windows which
is nowhere else used except for creating the stacking order in ::paint.

The implementations are moved to the base class, the only Scene specific
code is a pure virtual factory method to create the Scene window. This
already existed in SceneOpenGL to create either a SceneOpenGL1 or 2
window.

Also the hash of windows is a Scene private member now and the creation
of the stacking order is provided by a method, so that the Scene sub
classes do no longer need to access the stacking order at all.

REVIEW: 111207
2014-01-07 15:34:19 +01:00
Martin Gräßlin
1a0e586b9c Pass creation of Shadow sub class instance to Scene
Instead of having the Shadow factory method check the compositor type and
do the decision which Shadow sub class to create, a pure virtual method in
Scene is called which returns the specific Shadow sub class instance.
2014-01-07 15:34:19 +01:00
Martin Gräßlin
5d3d8834ab Pass creation of Scene::EffectFrame to the Scene
Instead of having the EffectFrameImpl check the compositor type and do
the decision which Scene::EffectFrame to create, a pure virtual method
in Scene is called which returns the specific Scene::EffectFrame.
2014-01-07 15:34:19 +01:00
Martin Gräßlin
9b0c6ddef3 Drop pure virtual Scene::windowOpacityChanged slot
It's neither implemented in the XRender nor in the OpenGL Scene.
2014-01-07 15:34:19 +01:00
Aleix Pol
e995a9d76f Remove qt4_automoc calls
They're not needed anymore, and break my build directory from time to time.
If this commit breaks your compilation, clean your build directory (or at
least the plasma and kwin subdirectories).
2014-01-07 15:29:44 +01:00
Martin Gräßlin
144003a0aa [kwin] Generate dbus interface for Appmenu
Generated code > hand written code.
2014-01-07 14:06:56 +01:00
Martin Gräßlin
50987a6ddc [kwin] Fix TestVirtualDesktops
* enable compilation
* Remove KActionCollection
2014-01-07 13:45:25 +01:00
Martin Gräßlin
f1a9dc4d25 [kwin] Re-enable the optional and experimental Wayland support
* Find Wayland was missing in CMakeLists.txt
* Wayland Backend is adjusted for new virtual methods (makeCurrent, doneCurrent)
* Buffer Age is implemented
2014-01-07 11:57:29 +01:00
Martin Gräßlin
afbc5222e1 Merge branch 'KDE/4.11' into master
Conflicts:
	CMakeLists.txt
	doc/kcontrol/screensaver/index.docbook
	kcontrol/krdb/krdb.cpp
	kscreensaver/kblank_screensaver/kblank.desktop
	kscreensaver/krandom_screensaver/krandom.desktop
	kscreensaver/libkscreensaver/main.cpp
	ksplash/ksplashqml/SplashApp.cpp
	kstyles/oxygen/config/main.cpp
	kstyles/oxygen/demo/main.cpp
	kstyles/oxygen/oxygenstylehelper.cpp
	kwin/clients/oxygen/config/oxygenexceptiondialog.cpp
	kwin/clients/oxygen/config/ui/oxygenconfigurationui.ui
	kwin/clients/oxygen/config/ui/oxygenexceptiondialog.ui
	kwin/clients/oxygen/demo/main.cpp
	kwin/clients/oxygen/oxygenconfigdata.kcfg
	kwin/egl_wayland_backend.cpp
	kwin/eglonxbackend.h
	kwin/glxbackend.cpp
	kwin/glxbackend.h
	kwin/kcmkwin/kwinoptions/kwinactions.desktop
	kwin/scene_opengl.cpp
	kwin/scene_opengl.h
	plasma/desktop/applets/pager/pager.cpp
	plasma/desktop/shell/activitymanager/activitymanager.cpp
	plasma/desktop/shell/activitymanager/activitymanager.h
	plasma/desktop/shell/controllerwindow.cpp
	plasma/desktop/shell/data/plasma-desktop.desktop
	plasma/generic/dataengines/geolocation/geolocation.cpp
	plasma/generic/dataengines/nowplaying/plasma-dataengine-nowplaying.desktop
	plasma/generic/wallpapers/color/plasma-wallpaper-color.desktop
	plasma/generic/wallpapers/image/image.cpp
	plasma/generic/wallpapers/image/image.h
2014-01-07 09:36:11 +01:00
l10n daemon script
ce8c99cbef SVN_SILENT made messages (.desktop file) 2014-01-06 04:01:54 +00:00
l10n daemon script
5d8f86b71d SVN_SILENT made messages (.desktop file) 2014-01-05 06:38:46 +00:00
l10n daemon script
1fb1a178fd SVN_SILENT made messages (.desktop file) 2014-01-05 04:08:18 +00:00
Martin Gräßlin
2837550cbb [kcm-kwintabbox] Add properties brightness and saturation to ThumbnailItem
This was missing from what is available in KWin core. The brightness and
saturation are implemented using a custom shader which uses the same
logic as what we use in the scene shader.
2014-01-03 16:54:07 +01:00
Martin Gräßlin
19d567ef7f [kcm-kwintabbox] Use QQuickItem for Thumbnail instead of QQuickPaintedItem
We are only rendering an image, so it's better to load the image into a
texture. This allows to properly scale the example preview which
magically fixes all the layouting problems which used to be there.
2014-01-03 14:10:17 +01:00
Martin Gräßlin
8de72623c6 [kwin/tabbox] Use property binding for x and y properties
After changes in PlasmaCore.Dialog we can finally get rid of updating
the position on each visible change.

It's not 100 % perfect yet, seems the binding on screenGeometry is not
working properly. That needs investigation.
2014-01-03 12:59:14 +01:00
Martin Gräßlin
47f443479c [kwin] Port Plasma::Dialog from windowFlags to flags 2014-01-03 11:33:14 +01:00
Martin Gräßlin
33921a9535 [kcm-kwintabbox] Add a debug message on failed QML loading
If the Layout Preview fails to load the Qml, at least show a debug
message to see what's going wrong.
2014-01-03 11:24:23 +01:00
l10n daemon script
e05a97f216 SVN_SILENT made messages (.desktop file) 2014-01-03 04:48:00 +00:00
Christophe Giboudeaux
705173e1bb kdeclarative.h is not needed there 2014-01-02 19:20:42 +01:00
l10n daemon script
938332b6ac SVN_SILENT made messages (.desktop file) 2013-12-23 06:26:56 +00:00
l10n daemon script
63165c870f SVN_SILENT made messages (.desktop file) 2013-12-23 03:57:54 +00:00
Martin Gräßlin
a4943bc0e3 [kwin/effects] Add links to effect videos
Videos for the following effects are added:
* Dim Inactive
* Dim Screen for Administration Mode
* Invert
* Looking Glass
* Magnifier
* Mouse Click
* Track Mouse
* Zoom

Link for Present Windows video fixed.
2013-12-22 15:23:48 +01:00
Mihail Ivchenko
26f390f4ed [kwin/kcm-tabbox] Implemented ExampleClientModel::longestCaption()
REVIEW: 114608
2013-12-22 12:38:05 +01:00
Mihail Ivchenko
d7e2df674a [kwin] Add a method longestCaption() in TabBox::DesktopModel.
REVIEW: 114585
2013-12-22 10:40:28 +01:00
l10n daemon script
22640e26f3 SVN_SILENT made messages (.desktop file) 2013-12-22 04:09:59 +00:00
l10n daemon script
da9baf3de6 SVN_SILENT made messages (.desktop file) 2013-12-20 04:27:47 +00:00
l10n daemon script
c9c902b7e5 SVN_SILENT made messages (.desktop file) 2013-12-19 06:44:27 +00:00