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

List:       kwin
Subject:    phewww... (was Re: shadows vs. argb decos)
From:       Thomas =?iso-8859-15?q?L=FCbking?= <thomas.luebking () web ! de>
Date:       2009-06-10 18:30:38
Message-ID: 200906102030.39717.thomas.luebking () web ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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



[Attachment #5 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" \
"http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" \
content="1" /><style type="text/css">p, li { white-space: pre-wrap; \
}</style></head><body style=" font-family:'Segoe'; font-size:9pt; font-weight:400; \
font-style:normal;">it's actually good to sleep from time to time =D<br> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"><br></p>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)<br> <p style="-qt-paragraph-type:empty; \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>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)<br> <p style="-qt-paragraph-type:empty; \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>patch attached, \
thanks to lucas info w/ new symbol, no impact on scene.cpp, no glitches so far (and \
after some mean stress tests)<br> <p style="-qt-paragraph-type:empty; margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;"><br></p>i'm happy<br> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"><br></p>Thomas<br> <p style="-qt-paragraph-type:empty; \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"><br></p></body></html>


["argb_deco_vs_shadow_fix.diff" (text/x-patch)]

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 )
             {


_______________________________________________
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