From kwin Wed Jun 10 18:30:38 2009 From: Thomas =?iso-8859-15?q?L=FCbking?= Date: Wed, 10 Jun 2009 18:30:38 +0000 To: kwin Subject: phewww... (was Re: shadows vs. argb decos) Message-Id: <200906102030.39717.thomas.luebking () web ! de> X-MARC-Message: https://marc.info/?l=kwin&m=124465888026022 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Boundary-00=_Pv/LKMguuRfwIKW" --Boundary-00=_Pv/LKMguuRfwIKW Content-Type: multipart/alternative; boundary="Boundary-01=_Pv/LKk/5ObyXrS5" Content-Transfer-Encoding: 7bit --Boundary-01=_Pv/LKk/5ObyXrS5 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit it's actually good to sleep from time to time =D looking into scene.cpp and shadow.cpp /again/ it turned out that all that had to be don was to treat ARGB deco pass as ARGB window (i.e. flush the shadow cache, this is necessary as the deco could e.g. look like uaahhh... vista... ;-) but simply ignore them when it comes to real shadow painting (as you can be pretty sure: we just handled this window) This is probably not the peak of performance (regarding we've ARGB decos anyway and i'm not sure on that part) and esp. still doesn't fix the "custom deco shape" a.ka. BII issue) but it shouldn't be much more inefficient than the pre-ARGB deco time (and is certainly better than my last real glitchfree attempt) patch attached, thanks to lucas info w/ new symbol, no impact on scene.cpp, no glitches so far (and after some mean stress tests) i'm happy Thomas --Boundary-01=_Pv/LKk/5ObyXrS5 Content-Type: text/html; charset="iso-8859-15" Content-Transfer-Encoding: 7bit it's actually good to sleep from time to time =D


looking into scene.cpp and shadow.cpp /again/ it turned out that all that had to be don was to treat ARGB deco pass as ARGB window (i.e. flush the shadow cache, this is necessary as the deco could e.g. look like uaahhh... vista... ;-) but simply ignore them when it comes to real shadow painting (as you can be pretty sure: we just handled this window)


This is probably not the peak of performance (regarding we've ARGB decos anyway and i'm not sure on that part) and esp. still doesn't fix the "custom deco shape" a.ka. BII issue) but it shouldn't be much more inefficient than the pre-ARGB deco time (and is certainly better than my last real glitchfree attempt)


patch attached, thanks to lucas info w/ new symbol, no impact on scene.cpp, no glitches so far (and after some mean stress tests)


i'm happy


Thomas



--Boundary-01=_Pv/LKk/5ObyXrS5-- --Boundary-00=_Pv/LKMguuRfwIKW Content-Type: text/x-patch; charset="UTF-8"; name="argb_deco_vs_shadow_fix.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="argb_deco_vs_shadow_fix.diff" Index: lib/kwineffects.h =================================================================== --- lib/kwineffects.h (Revision 978556) +++ lib/kwineffects.h (Arbeitskopie) @@ -276,7 +276,11 @@ /** * Clear whole background as the very first step, without optimizing it **/ - PAINT_SCREEN_BACKGROUND_FIRST = 1 << 6 + PAINT_SCREEN_BACKGROUND_FIRST = 1 << 6, + /** + * Temporary solution since (_OPAQUE | _TRANSLUCENT) is not working currently. + **/ + PAINT_DECORATION_ONLY = 1 << 7 }; /** Index: effects/shadow/shadow.cpp =================================================================== --- effects/shadow/shadow.cpp (Revision 978556) +++ effects/shadow/shadow.cpp (Arbeitskopie) @@ -287,14 +287,14 @@ { // Whether the shadow drawing can be delayed or not. bool optimize = !( mask & ( PAINT_WINDOW_TRANSFORMED | PAINT_SCREEN_TRANSFORMED | - PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS | PAINT_WINDOW_TRANSLUCENT )); + PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS | PAINT_WINDOW_TRANSLUCENT | PAINT_DECORATION_ONLY )); if( !optimize ) { // Transformed or translucent windows are drawn bottom-to-top, so // first we need to draw all queued shadows. drawQueuedShadows( w ); } - if( useShadow( w )) + if( useShadow( w ) && !(mask & PAINT_DECORATION_ONLY) ) { if( !optimize ) { --Boundary-00=_Pv/LKMguuRfwIKW Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kwin mailing list kwin@kde.org https://mail.kde.org/mailman/listinfo/kwin --Boundary-00=_Pv/LKMguuRfwIKW--