[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwin
Subject:    Re: Optimizing minimize effect
From:       Martin =?iso-8859-1?q?Gr=E4=DFlin?= <kde () martin-graesslin ! com>
Date:       2011-01-06 6:05:38
Message-ID: 201101060705.46599.kde () martin-graesslin ! com
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Wednesday 05 January 2011 17:25:11 Thomas Richard wrote:
> Hello all,
> 
> I'm trying to optime the minimize effect by only painting the areas that
> are needed.
nice :-)
> I seem to have a problem though. The code I currently have is
> this:
> 
> http://paste.kde.org/1843/
> 
> (Is there an easier way to get geometry including decorations?)
Just use geometry, it includes the decoration ;-) If that does not work you 
can use the WindowsQuads. Have a look at the Screenshot Effect.

Btw. the manual calculation of the region could be dangerous, if another 
effect is animating the window. The effect API does currently not provide any 
handy way to trigger a repaint for the actual painted geometry.
> 
> If I minimize a window with the 'show paint' plugin enabled i can see that
> indeed the only region that is updated, is a path of rectangles following
> the minimize effect. However, some artifacts are left behind. Am I missing
> something here?
I think you run into a clipping error. Please try your patches on top of kwin-
gles [1] where a clipping bug is fixed. (The code needs to be on top of kwin-
gles anyway, as kwin trunk is "frozen" till the code is merged ;-)
> 
> I know there are some more problems but I'd like to see this work before
> investing more time in it.
From what I see you are using a previous region which you set to update in 
paintWindow to unite it again in postPaintScreen. That looks somewhat false 
;-) In post paint screen you need to update the both the current rendered 
geometry and the geometry of the next repaint (which you cannot know yet).  
What could work is to add the new geometry in the prePaintPass by uniting the 
paint region with the region where it will be painted. Another solution would 
be to always repaint the complete area of the animation from the start window 
to the icon geometry.

Cheers
Martin

[1] http://gitweb.kde.org/scratch/graesslin/kwin-gles.git/

["signature.asc" (application/pgp-signature)]

_______________________________________________
kwin mailing list
kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic