Commit Graph

201 Commits (7fff9705b498c789fe90510c52b9a63cbde5d967)

Author SHA1 Message Date
Andriy Rysin 4317ca8e88 Revert "Make kwin compile without OpenGL libs"
This reverts commit 940db4e348cf3ee016df04484616df7599504863.
2011-09-30 18:30:49 -04:00
Andriy Rysin e94f58dd1b Make kwin compile without OpenGL libs
REVIEW: 101418
2011-09-29 23:27:16 -04: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
Thomas Lübking e930a50f8a coding style 2011-08-28 20:25:58 +02:00
Thomas Lübking 9d4a7c3d19 drop ignored damage events from the X11 event queue 2011-08-28 14:23:56 +02:00
Martin Gräßlin 4fb110383d Drop an unused timer 2011-08-28 10:05:00 +02:00
Thomas Lübking 12b9b1c79e fix xsync protocol
BUG: 160393
REVIEW: 102311
2011-08-24 01:39:34 +02:00
Martin Gräßlin 0c47ca5e97 Remove defines for X extensions
The following dependencies have become mandatory build deps:
* XRandR
* XRender
* XFixes
* XDamage
* XComposite
2011-08-13 16:46:43 +02:00
Martin Gräßlin 987bc837d9 Remove define KWIN_HAVE_OPENGL_COMPOSITING
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.
2011-08-13 16:46:43 +02:00
Martin Gräßlin b7d2b16b8d Remove define KWIN_HAVE_COMPOSITING
Building the workspaces requires to have all the build dependencies
which were required for KWIN_HAVE_COMPOSITING to be set. This allows
us to remove all the ifdefs for this and gives us a cleaner code.
2011-08-13 16:46:43 +02:00
Thomas Lübking 2843436393 add some damageRatio = 0.0 resets, required for esp. GTK+ popups 2011-08-13 10:36:35 +02:00
Martin Gräßlin c3cf4482a3 Move GLX detection from kwinglobals to CompositingPrefs
Removes the Extension::glxAvailable() from kwinglobals and
implements the functionality in CompositingPrefs, where it
is only needed. There used to be one additional check in
scene_opengl_glx.cpp which is moved into composite.cpp
before the OpenGL Scene is created.

REVIEW: 102002
2011-07-27 18:34:31 +02:00
Arthur Arlt 04fd63b201 Move scene->windowAdded() to Toplevel's setupCompositing() function
Moved the function call of scene->windowAdded() to setupComposition() of
Toplevel. The function calls from Workspace were removed, since
windowAdded() is called by setupCompositing() now, which is called anyway.

REVIEW: 102047
2011-07-25 12:27:43 +02:00
Philipp Knechtges fc5e74f4e2 kwin: make decoration repaints window-specific
This gives the new Scene::paintSimpleScreen more room for optimizations.
2011-07-15 10:27:11 +02:00
Thomas Lübking f0492f9b02 fix shadow fix
(cherry picked from commit 55986b32de9e5f5f66ac0c3448b26863cfc2dee0)
2011-07-13 23:08:03 +02:00
Thomas Lübking d20b841713 fix GL-less kwin compilation
BUG: 277667
2011-07-13 04:09:35 +02:00
Thomas Lübking 7057bb2c25 fix new shadows
(cherry picked from commit 6f03f28509834cb145b8548dfd0322cc6d62364f)
2011-07-12 22:20:21 +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
Martin Gräßlin b4de899b2c Fix broken creation of OverlayWindow
The HAVE_XCOMPOSITE_OVERLAY define had not been moved to the new
overlaywindow.cpp file causing the OverlayWindow to not be created
at all. In fact after moving the define to the new file the code
did not even compile as that code parts still used m_overlayWindow
instead of m_window.

The regression would have been easy to spot when testing with all
backends as the GLES/EGL backend still requires the overlay window.

CCMAIL: a.arlt@stud.uni-heidelberg.de
2011-07-11 19:12:56 +02:00
Thomas Lübking cf66e4c86d KWin: Make damageNotifyEvent handling more aggressively aggregate rects
and skip damage handling if the window is already completely damaged.
Also avoid QRegion handling during this since we know about the rects and
the region is handled when adding the damage anyway.
2011-07-10 00:10:43 +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
Martin Gräßlin e766fe0a82 Remove the compositing too slow checks
The heuristic never worked reliable.

REVIEW: 101750
2011-06-26 09:18:08 +02:00
Philipp Knechtges 2c0b0e9f18 Performance bugfix.
In case we use OpenGL compositing and KWin is started with the raster graphicssystem,
the decoration gets painted with the raster backend.
REVIEW: 101370
2011-05-18 21:27:11 +02:00
Thomas Lübking 364ce6fbfc Allow the user to rearm OpenGLIsUnsafe KWIn autocrash protection
Also add a usable "doesn't work why" info and WARN! the user about clicking the rearm button.
Merge "OpenGLIsUnsafe" and "CheckIsSafe" config keys
Move the entire checking into CompositingPrefs

BUG:250865
FIXED-IN:4.7
2011-05-11 20:16:08 +02:00
Martin Gräßlin f97c92fde9 KWin does not require a decoration plugin any more
With config option "NoPlugin" in group "Style" it is possible to
no request that KWin should be run without a decoration plugin.
This is a change for Plasma Active to properly support no decorations.

As well if a decoration plugin cannot be loaded, KWin will no longer
exit, but continue to run just without a decoration. As a nice
side-effect changes in Oxygen no longer destroy my kwin build ;-)

BUG: 224440
FIXED-IN: 4.7.0
CCMAIL: sebas@kde.org
2011-04-28 16:05:23 +02:00
Martin Gräßlin 320de6abc6 Merge branch 'master' into oxygen-shadows
Conflicts:
	kwin/atoms.cpp
	kwin/atoms.h
2011-04-04 18:09:59 +02:00
Thomas Lübking 31278d570e add rule/property based composite blocking 2011-04-04 01:59:52 +02:00
Martin Gräßlin 24f36b7fae Shadow is read when Scene::Window is created 2011-04-03 12:13:20 +02:00
Martin Gräßlin 89aa8ee8db Fix repainting of shadow after window closes
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!
2011-04-01 21:49:44 +02:00
Martin Gräßlin 12220a0d59 Initial implementation of new Shadows in KWin
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.
2011-03-27 12:33:07 +02:00
Martin Gräßlin b52975a57e Merge branch 'libkwineffects'
The branch contains the first step in reworking the kwineffects
library. This includes:
* replacing virtuals by signals and slots
* dropping some unused methods
* remove KWin::TimeLine

More to come.

Conflicts:
	kwin/workspace.cpp
2011-03-16 19:46:59 +01:00
Martin Gräßlin 6e7e1c530b Remove transformWindowDamage effects hook
It is not used by any effect, so we save one complete go through
all effects pass on each window damage.

The functionality which could be provided by this hook can also be
implemented using the window damaged signal.
2011-03-15 20:38:37 +01:00
Martin Gräßlin 88d50727ee WindowDamaged becomes a signal 2011-03-12 15:04:22 +01:00
Thomas Lübking 0c5d47f3ae unify composite activation, 'Enable' only controls initial state 2011-03-06 22:35:13 +01:00
Fredrik Höglund 09dc033e8c kwin: Use QDateTime::currentMSecsSinceEpoch() instead of QTime::currentTime(). 2011-02-01 16:38:06 +01:00
Fredrik Höglund 2d81d28e7a kwin: Use QBasicTimer instead of managing the timer ID manually. 2011-02-01 16:35:51 +01: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
Thomas Lübking e2dcfff601 commiting http://svn.reviewboard.kde.org/r/6120/#review9304
this should improve v'syncing, maybe v'synced "smoothness"
remaining and exposed issue are "dirty textures" w/o damage events (see the requst description)
can be diminished by increasing MaxFPS above the fastest update (or shadowed below the slowest one)
CCBUG: 258971

svn path=/trunk/KDE/kdebase/workspace/; revision=1207577
2010-12-18 16:51:43 +00:00
Thomas Lübking c7a3a21116 support nvidias proprietary refreshrate through asking nvidia-settgins
svn path=/trunk/KDE/kdebase/workspace/; revision=1201396
2010-11-27 15:27:54 +00:00
Martin Gräßlin 3e689ff201 Cache generated Lanczos textures.
This provides a significant performance improvement especially for Present Windows.
Whenever a lanczos resampling is done the resulted texture is cached, till the
window is damaged or a texture of different size is required. This means that
for a taskbar thumbnail the resampling only occurs once unless the window is damaged
and for present windows it only occurs when the windows are resized and then only
after the windows have already been moved. Highlighting windows does not cause
a resampling any more.
See review request http://svn.reviewboard.kde.org/r/5708/

svn path=/trunk/KDE/kdebase/workspace/; revision=1191874
2010-11-01 10:46:11 +00:00
Martin Gräßlin 12918d3ee8 Disabling the fallback to XRender. It's causing more trouble than the benefits.
With Intel drivers currently the self check at KWin startup fails (no idea why) and KWin falls back to XRender. This is probably an explanation for all the complaints about slow kwin in 4.5 and the missing effects. So let's fail and make it possible to restart compositing via systemsettings and alt+shift+f12.
Nevertheless it would be nice to fix the the failing selfcheck...

svn path=/trunk/KDE/kdebase/workspace/; revision=1148315
2010-07-10 08:44:40 +00:00
Aaron J. Seigo c83c168c16 'composit[e|ing]' is technical jargon; use the terminology we use elsewhere in the UI (particularly the config UI) consistently everywhere. tested on real life users(tm)
svn path=/trunk/KDE/kdebase/workspace/; revision=1103845
2010-03-16 01:17:36 +00:00
Lucas Murray 8960c552d2 Remove OpenGL driver whitelist; Add protection against crashy glXQuery
functions and share the value with the KCM; Fallback to XRender
compositing if OpenGL fails to work correctly; Rearrange setting order
in options.h slightly and fix variable names

svn path=/trunk/KDE/kdebase/workspace/; revision=1079919
2010-01-25 10:02:08 +00:00
Jacopo De Simoi 71a73acae8 Avoids a nasty race condition that caused corrupted window decorations
BUG:199735


svn path=/trunk/KDE/kdebase/workspace/; revision=1046461
2009-11-08 19:47:58 +00:00
Lucas Murray 20f1a79d04 Less warnings please.
svn path=/trunk/KDE/kdebase/workspace/; revision=1031490
2009-10-05 09:47:13 +00:00
Hugo Pereira Da Costa 3004fba3ce notify decorations when compositing is suspended
svn path=/trunk/KDE/kdebase/workspace/; revision=1021802
2009-09-10 05:05:44 +00:00
Martin Gräßlin 47366d5720 Reset Repaints on a Toplevel has to include the decoration shadows if used.
svn path=/trunk/KDE/kdebase/workspace/; revision=1006788
2009-08-04 12:20:33 +00:00
Martin Gräßlin 8981223956 Reimplement addRepaintFull() in Client and add the padding to the repaint region.
CCBUG: 201596

svn path=/trunk/KDE/kdebase/workspace/; revision=1004121
2009-07-29 11:48:55 +00:00
Martin Gräßlin ba27d2ebb0 Copy decoration pixmaps to Deleted. By that we see the decoration also when having a fade out animation.
As this is a bigger commit I will wait with backporting to 4.3 for something about two or three weeks and will only backport if nobody yells.
BUG: 201780

svn path=/trunk/KDE/kdebase/workspace/; revision=1004096
2009-07-29 11:07:28 +00:00