Bug 160948 - Shadows faster than windows !
Summary: Shadows faster than windows !
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-17 19:38 UTC by Aldoo
Modified: 2011-01-31 22:06 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aldoo 2008-04-17 19:38:12 UTC
Version:            (using KDE 4.0.3)
Installed from:    Ubuntu Packages

Not a big problem, but it makes the desktop look "unfinished".
Steps for reproducing: take a computer with a not so fast GPU (like Intel 945GM), and open a new Window.
Then if you really look, and if you haven't enabled any particular effect in kwin, you will see that the shadow of the new window appears some time before the window itself.
The other way around, when you close a window, the shadow disappears a fraction of second after the window.
Try with the K-menu, or with krunner for instance, as kwin does not apply effects to their windows.

In my opinion, waiting for a quarter of second for the krunner window to appear is not an issue, but for its shadow not to be synchronized looks unpolished. Wouldn't it be possible to synchronize it ? (make it wait for the window)

Technically, are the window and its shadow rendered into the same opengl picture ? If so, then wouldn't it be possible to show the texture only when the window is ready ?
Comment 1 Diederik van der Boor 2008-06-29 12:39:17 UTC
In KDE 4.1 beta 2, I have a similar problem with pulldown boxes. The shadow is displayed before the actual contents of the pulldown widget.
Comment 2 Diederik van der Boor 2008-06-29 12:39:58 UTC
FYI, I'm using a NVidia geforce 6600 with NVidia drivers (a pretty fast GPU for desktop effects).
Comment 3 Dario Andres 2008-12-21 21:02:09 UTC
Can anyone still reproduce this bug with a recent KDE version? (4.1.3 / 4.2beta2 / 4.2svn) and updated graphic drivers ?  Thanks :) 
Comment 4 Aldoo 2008-12-24 18:21:02 UTC
Still reproducing it on 4.2 beta with a GeForce 8400gm, beta drivers (180.08).
It will be visible in any situation when the system is under load.
It does not look like a driver issue to me, just a synchronization problem (but the fact that the system is so often under heavy load with a recent nVidia might be a driver issue!).

Not sure if kwin is guilty though... maybe it is just a QT thing.
Comment 5 Giovanni Masucci 2008-12-25 18:36:33 UTC
still reproducing the problem:
intel cards  (2.5 drivers)
kde 4.2beta2, xorg 7.4 (xorg-server 1.5.3)
Comment 6 Marvin 2009-02-14 00:51:36 UTC
same problem here
nvidia 8600gt, driver 180.22
kde 4.2.0
Comment 7 michaell 2009-09-02 23:23:03 UTC
Problem still exists in KDE 4.3.1.
The desktop doesn't feel good with that.
Comment 8 Andreas Fackler 2010-06-30 10:00:57 UTC
... and in KDE 4.4.4.
(Using the intel xorg driver 2.12.)
Comment 9 Jaime Torres 2010-10-10 11:13:26 UTC
In 4.6 development, with a radeon 300, and looking carefully, the shadow appears after the window is displayed (tested minimizing and restoring without any other effect). Also tested calling krite, looking, closing, looking... May be my eyes are not fast enough, but I do not see.
Are you able to reproduce it with a more recent KDE SC version (4.5.2 or later)?
Comment 10 Christoph Feck 2010-10-10 12:07:36 UTC
I am running daily trunk and can still confirm the bug. This is especially visible when browsing menus (for example the traditional kickoff).
Comment 11 Martin Flöser 2010-10-10 12:42:26 UTC
It is important to know that we have to different shadows:
1. The "classic" shadows used for undecorated windows or "legacy" window 
decorations (not Oxygen or Aurorae)
2. Decoration shadows which are more or less part of the window and only 
painted together with the window.

The bug only applies for the first kind of shadows. If blur is also used it is 
difficult to say if the bug is still present as those two effects interfer. 
Given the architecture of our compositing stack I am rather sure that the bug 
is still present and fixing it probably requires some rework on the shadow 
effect.
Comment 12 Christoph Feck 2010-10-10 13:22:53 UTC
The biggest problem is not the "order" of compositing, but the fact that KWin happily renders the shadows even if the application has not used sync() or flush() yet to actually render the content.
Comment 13 Martin Flöser 2011-01-31 22:06:18 UTC
Git commit 3b8984d630cc6dc655a171fa9c0f7e74e9ee3c61 by Martin Gr����lin.
Pushed by graesslin into branch 'graesslin/kwin-cleanup'.

Remove Shadow Effect.

The shadow effect is known to be broken since at least 4.5.
It is unfortunately in a state which makes it difficult to maintain
and the architecture has some serious drawbacks. Therefore it is the
best solution to replace the effect with a new and better
implementation. For more information about the new implementation
please see the discussion on KWin mailinglist:
http://lists.kde.org/?l=kwin&m=129607406517609&w=2

This also "fixes" all existing bug reports about the shadow effect.
Most of the bugs will really be fixed when the new shadow system is
implemented, if not it is a new bug and a new report should be created
for it.

Please excuse that we go this unnormal approach to mark bugs as
fixed with code removal.
BUG: 164084
BUG: 160948
BUG: 189241
BUG: 229164
BUG: 258663
BUG: 216709
BUG: 243890
FIXED-IN: 4.7.0

M  +0    -1    kwin/effects/CMakeLists.txt     
M  +0    -7    kwin/effects/configs_builtins.cpp     
D  +0    -31   kwin/effects/shadow/CMakeLists.txt     
D  +0    -786  kwin/effects/shadow/shadow.cpp     
D  +0    -166  kwin/effects/shadow/shadow.desktop     [TRAILING SPACE] [TRAILING SPACE]
D  +0    -102  kwin/effects/shadow/shadow.h     
D  +0    -128  kwin/effects/shadow/shadow_config.cpp     
D  +0    -91   kwin/effects/shadow/shadow_config.desktop     
D  +0    -57   kwin/effects/shadow/shadow_config.h     
D  +0    -258  kwin/effects/shadow/shadow_config.ui     
D  +0    -70   kwin/effects/shadow/shadow_helper.h     
M  +0    -4    kwin/kcmkwin/kwincompositing/main.cpp     
M  +9    -20   kwin/kcmkwin/kwincompositing/main.ui     

http://commits.kde.org/a5d5b61a/3b8984d630cc6dc655a171fa9c0f7e74e9ee3c61