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

List:       kwin
Subject:    Re: Review Request 109783: split hasWaitSync to blocksForRetrace and syncsToVBlank
From:       Thomas_Lübking <thomas.luebking () gmail ! com>
Date:       2013-04-09 20:17:23
Message-ID: 20130409201723.23801.21062 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On April 8, 2013, 5:06 p.m., Ralf Jung wrote:
> > kwin/eglonxbackend.cpp, line 102
> > <http://git.reviewboard.kde.org/r/109783/diff/2/?file=130267#file130267line102>
> > 
> > This is redundant, isn't it?

Yes. It's there to keep the branches analogue and also to "document" what we're about \
to do here. Otherwise we'd have setTripleBufferinUndetected(true) and set it there.

Since the function will set a bool bit and this is not quite our hot loop (not at all \
... ;-) i don't think it's much relevant, but we also just could // comment it.


> On April 8, 2013, 5:06 p.m., Ralf Jung wrote:
> > kwin/eglonxbackend.cpp, line 220
> > <http://git.reviewboard.kde.org/r/109783/diff/2/?file=130267#file130267line220>
> > 
> > static variables in functions always make my head hurt when I try to think about \
> > all the possible consequences... is there any reason not to put these into the \
> > backend class?

Implementation ("detection") detail and only required in this one function.

What "possible consequences" of local statics that a global or member static would no \
share?


- Thomas


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


On April 3, 2013, 10:12 p.m., Thomas Lübking wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/109783/
> -----------------------------------------------------------
> 
> (Updated April 3, 2013, 10:12 p.m.)
> 
> 
> Review request for kwin, Martin Gräßlin and Ralf Jung.
> 
> 
> Description
> -------
> 
> ... for that is not the same (though atm. syncsToVBlank is only used to determine \
> the fps interval - other usage pot. for supportInfo etc.) 
> Also "hasWaitSync" is an implementation detail of GLX - EGL doesn't have it.
> 
> 
> Diffs
> -----
> 
> kwin/composite.cpp ee885dc 
> kwin/eglonxbackend.h 9283fbe 
> kwin/eglonxbackend.cpp ecb6e0a 
> kwin/glxbackend.h 49b897e 
> kwin/glxbackend.cpp c68bcee 
> kwin/scene.h 5d49c40 
> kwin/scene.cpp 939f000 
> kwin/scene_opengl.h 409ec3d 
> kwin/scene_opengl.cpp 3343164 
> 
> Diff: http://git.reviewboard.kde.org/r/109783/diff/
> 
> 
> Testing
> -------
> 
> Compiles and runs. Is part of https://git.reviewboard.kde.org/r/109086/ and has \
> been used for pretty long here now. 
> 
> Thanks,
> 
> Thomas Lübking
> 
> 


[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/109783/">http://git.reviewboard.kde.org/r/109783/</a>
  </td>
    </tr>
   </table>
   <br />










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On April 8th, 2013, 5:06 p.m. UTC, <b>Ralf \
Jung</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="http://git.reviewboard.kde.org/r/109783/diff/2/?file=130267#file130267line102" \
style="color: black; font-weight: bold; text-decoration: \
underline;">kwin/eglonxbackend.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">void \
EglOnXBackend::init()</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">102</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">              \
<span class="n">setBlocksForRetrace</span><span class="p">(</span><span \
class="nb">false</span><span class="p">);</span></pre></td>  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This is redundant, \
isn&#39;t it?</pre>  </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Yes. \
It&#39;s there to keep the branches analogue and also to &quot;document&quot; what \
we&#39;re about to do here. Otherwise we&#39;d have setTripleBufferinUndetected(true) \
and set it there.

Since the function will set a bool bit and this is not quite our hot loop (not at all \
... ;-) i don&#39;t think it&#39;s much relevant, but we also just could // comment \
it.</pre> <br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On April 8th, 2013, 5:06 p.m. UTC, <b>Ralf \
Jung</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="http://git.reviewboard.kde.org/r/109783/diff/2/?file=130267#file130267line220" \
style="color: black; font-weight: bold; text-decoration: \
underline;">kwin/eglonxbackend.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">bool \
EglOnXBackend::initBufferConfigs()</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">220</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="k">static</span> <span class="n">QElapsedTimer</span> <span \
class="n">swapTimer</span><span class="p">;</span></pre></td>  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">static variables in \
functions always make my head hurt when I try to think about all the possible \
consequences... is there any reason not to put these into the backend class?</pre>  \
</blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Implementation (&quot;detection&quot;) detail and only required in this \
one function.

What &quot;possible consequences&quot; of local statics that a global or member \
static would no share?</pre> <br />




<p>- Thomas</p>


<br />
<p>On April 3rd, 2013, 10:12 p.m. UTC, Thomas Lübking wrote:</p>








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

<div>Review request for kwin, Martin Gräßlin and Ralf Jung.</div>
<div>By Thomas Lübking.</div>


<p style="color: grey;"><i>Updated April 3, 2013, 10:12 p.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;">... for that is not the same (though atm. syncsToVBlank is only used to \
determine the fps interval - other usage pot. for supportInfo etc.)

Also &quot;hasWaitSync&quot; is an implementation detail of GLX - EGL doesn&#39;t \
have it.</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;">Compiles and runs. Is part of https://git.reviewboard.kde.org/r/109086/ \
and has been used for pretty long here now.</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">(ee885dc)</span></li>

 <li>kwin/eglonxbackend.h <span style="color: grey">(9283fbe)</span></li>

 <li>kwin/eglonxbackend.cpp <span style="color: grey">(ecb6e0a)</span></li>

 <li>kwin/glxbackend.h <span style="color: grey">(49b897e)</span></li>

 <li>kwin/glxbackend.cpp <span style="color: grey">(c68bcee)</span></li>

 <li>kwin/scene.h <span style="color: grey">(5d49c40)</span></li>

 <li>kwin/scene.cpp <span style="color: grey">(939f000)</span></li>

 <li>kwin/scene_opengl.h <span style="color: grey">(409ec3d)</span></li>

 <li>kwin/scene_opengl.cpp <span style="color: grey">(3343164)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/109783/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