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

List:       kwin
Subject:    Re: Review Request: [RFC] Good Bye to virtuals in EffectWindow part 1
From:       Martin_Gräßlin <kde () martin-graesslin ! com>
Date:       2012-01-04 17:35:35
Message-ID: 20120104173535.22365.47988 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103567/
-----------------------------------------------------------

(Updated Jan. 4, 2012, 5:35 p.m.)


Review request for kwin.


Changes
-------

* rebased on current master (no parent diff needed)
* use invokeMethod for closeWindow


Description
-------

EffectWindow becomes a QObject and make use of properties in EffectWindow w=
here possible instead of inheritance
    =

If possible use the property to Toplevel or Client instead of the pure virt=
ual methods. This makes it easier to get a stable ABI. Adding new methods t=
o the class no longer requires to add a pure virtual method.
    =

From a performance point of view this change should not matter. Most Effect=
Window methods are not invoked during the repaint chain. But only in respon=
se to an event like a window got added. There the overhead does not really =
matter as well the previous implementation made strong use of dynamic casts=
 which are also not knwon for being very fast.

Some virtuals are still there and should be removed. E.g. isManaged needs a=
 new method and property in Toplevel. Some other virtuals will stay - e.g. =
addRepaint. Some virtuals should go into a d-pointer: e.g setData and data.


Diffs (updated)
-----

  kwin/composite.cpp 55a7144 =

  kwin/effects.h f4ad2fb =

  kwin/effects.cpp 6c252c9 =

  kwin/libkwineffects/kwineffects.h 780cc89 =

  kwin/libkwineffects/kwineffects.cpp 1ad53bc =


Diff: http://git.reviewboard.kde.org/r/103567/diff/diff


Testing
-------

tested some effects, properties in general tested through kwin scripting


Thanks,

Martin Gr=C3=A4=C3=9Flin


[Attachment #5 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/103567/">http://git.reviewboard.kde.org/r/103567/</a>
  </td>
    </tr>
   </table>
   <br />


<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for kwin.</div>
<div>By Martin Gräßlin.</div>


<p style="color: grey;"><i>Updated Jan. 4, 2012, 5:35 p.m.</i></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
                break-word;">* rebased on current master (no parent diff needed)
* use invokeMethod for closeWindow</pre>
  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">EffectWindow becomes a QObject and make use of properties in \
EffectWindow where possible instead of inheritance  
If possible use the property to Toplevel or Client instead of the pure virtual \
methods. This makes it easier to get a stable ABI. Adding new methods to the class no \
longer requires to add a pure virtual method.  
From a performance point of view this change should not matter. Most EffectWindow \
methods are not invoked during the repaint chain. But only in response to an event \
like a window got added. There the overhead does not really matter as well the \
previous implementation made strong use of dynamic casts which are also not knwon for \
being very fast.

Some virtuals are still there and should be removed. E.g. isManaged needs a new \
method and property in Toplevel. Some other virtuals will stay - e.g. addRepaint. \
Some virtuals should go into a d-pointer: e.g setData and data.</pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">tested some effects, properties in general tested through kwin \
scripting</pre>  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> \
(updated)</h1> <ul style="margin-left: 3em; padding-left: 0;">

 <li>kwin/composite.cpp <span style="color: grey">(55a7144)</span></li>

 <li>kwin/effects.h <span style="color: grey">(f4ad2fb)</span></li>

 <li>kwin/effects.cpp <span style="color: grey">(6c252c9)</span></li>

 <li>kwin/libkwineffects/kwineffects.h <span style="color: \
grey">(780cc89)</span></li>

 <li>kwin/libkwineffects/kwineffects.cpp <span style="color: \
grey">(1ad53bc)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/103567/diff/" style="margin-left: \
3em;">View Diff</a></p>




  </td>
 </tr>
</table>




  </div>
 </body>
</html>



_______________________________________________
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