[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:       Thomas_Lübking <thomas.luebking () web ! de>
Date:       2011-12-30 8:27:26
Message-ID: 20111230082726.15103.74603 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On Dec. 29, 2011, 2:40 p.m., Thomas L=C3=BCbking wrote:
> > I was about to issue that you must prevent adding dynamic properties...=
 but that's covered ;-)
> > Otherwise i don't have major concerns (you spare the vtable lookup and =
the dynamic casts and trade in the hashing, hash lookup and the dynamic typ=
ing (QVariant conversion))
> > I just wonder whether it would make sense to depreciate the helper func=
tions and add
> > QVariant qtProperty(const char *name) const; // windowProperty could be=
 misleading in our context?!
> > bool setQtProperty(const char *name, const QVariant &value);
> > making the dynamic typing more visible to ppl. will rather cache result=
s for hot loop usage.
> > =

> > PS:
> > either you forgot to diff it or to add it or i'm blind or QObject has s=
ome magic secret autoproperty feature, but i somehow miss the Q_PROPERTY st=
uff in toplevel.h
> =

> Martin Gr=C3=A4=C3=9Flin wrote:
>     > either you forgot to diff it or to add it or i'm blind or QObject h=
as some magic secret autoproperty feature, but i somehow miss the Q_PROPERT=
Y stuff in toplevel.h
>     it needs my other review request as a parent diff. I thought I added =
it...

ahhh... there it is.
i had somehow sensed this was -partially- qml related ;-)


- Thomas


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


On Dec. 29, 2011, 9:47 a.m., Martin Gr=C3=A4=C3=9Flin wrote:
> =

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

> (Updated Dec. 29, 2011, 9:47 a.m.)
> =

> =

> Review request for kwin.
> =

> =

> Description
> -------
> =

> 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 vi=
rtual 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 Effe=
ctWindow methods are not invoked during the repaint chain. But only in resp=
onse to an event like a window got added. There the overhead does not reall=
y matter as well the previous implementation made strong use of dynamic cas=
ts 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 dat=
a.
> =

> =

> Diffs
> -----
> =

>   kwin/composite.cpp 2fddb33 =

>   kwin/effects.h 6530871 =

>   kwin/effects.cpp e388b33 =

>   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 />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On December 29th, 2011, 2:40 p.m., <b>Thomas \
Lübking</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">I was about to issue that you must prevent adding dynamic properties... \
but that&#39;s covered ;-) Otherwise i don&#39;t have major concerns (you spare the \
vtable lookup and the dynamic casts and trade in the hashing, hash lookup and the \
dynamic typing (QVariant conversion)) I just wonder whether it would make sense to \
depreciate the helper functions and add QVariant qtProperty(const char *name) const; \
// windowProperty could be misleading in our context?! bool setQtProperty(const char \
*name, const QVariant &amp;value); making the dynamic typing more visible to ppl. \
will rather cache results for hot loop usage.

PS:
either you forgot to diff it or to add it or i&#39;m blind or QObject has some magic \
secret autoproperty feature, but i somehow miss the Q_PROPERTY stuff in \
toplevel.h</pre>  </blockquote>




 <p>On December 30th, 2011, 7:46 a.m., <b>Martin Gräßlin</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">&gt; either you forgot \
to diff it or to add it or i&#39;m blind or QObject has some magic secret \
autoproperty feature, but i somehow miss the Q_PROPERTY stuff in toplevel.h it needs \
my other review request as a parent diff. I thought I added it...</pre>  \
</blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">ahhh... there it is. i \
had somehow sensed this was -partially- qml related ;-)</pre> <br />








<p>- Thomas</p>


<br />
<p>On December 29th, 2011, 9:47 a.m., Martin Gräßlin wrote:</p>






<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 Dec. 29, 2011, 9:47 a.m.</i></p>






<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> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

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

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

 <li>kwin/effects.cpp <span style="color: grey">(e388b33)</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