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

List:       kwin
Subject:    Re: Review Request: add screen inversion through XF86VidModeSetGammaRamp
From:       Thomas_Lübking <thomas.luebking () web ! de>
Date:       2012-04-17 19:05:17
Message-ID: 20120417190517.17576.15513 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On April 17, 2012, 5:04 p.m., Martin Gräßlin wrote:
> > kwin/useractions.cpp, lines 1684-1688
> > <http://git.reviewboard.kde.org/r/104371/diff/3/?file=55335#file55335line1684>
> > 
> > minor nitpick: the second if is not indented.

ftr:
i actually never indent the second if, if i "abuse" if for an "&&"

-> i put the entire thing into a regular block
if () {
   if () {
   }
}


- Thomas


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


On March 30, 2012, 9:13 p.m., Thomas Lübking wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/104371/
> -----------------------------------------------------------
> 
> (Updated March 30, 2012, 9:13 p.m.)
> 
> 
> Review request for kwin, Martin Gräßlin and Fredrik Höglund.
> 
> 
> Description
> -------
> 
> As proposed this allows to invert the screen with zero overhead or requirement of \
> OpenGL compositing. The patch depends on https://git.reviewboard.kde.org/r/103058/ \
> which adds the libXxf86vm dependency (until i link out that nvidia refreshrate \
> detection part) 
> Notice that it inverts the display colors - one cannot make an inverted screenshot \
> this way. 
> 
> Diffs
> -----
> 
> kwin/effects.h 994a89c 
> kwin/effects.cpp 8e73780 
> kwin/effects/invert/invert.h d02a570 
> kwin/effects/invert/invert.cpp e878516 
> kwin/kwinbindings.cpp 3284cf0 
> kwin/libkwineffects/kwineffects.h 1a6c7fc 
> kwin/useractions.cpp 09e18c3 
> kwin/workspace.h 2e400ea 
> 
> Diff: http://git.reviewboard.kde.org/r/104371/diff/
> 
> 
> Testing
> -------
> 
> Inverts the screen.
> However there's an issue with the screen parameter. Neither active_screen nor \
> QX11Info().screen() does work (unless on the primary screen, "0") - at least not on \
> a TwinView setup. We have to try xrandr and xinerama, but it will linkey only work \
> on independent screens or even X11 servers *shrug* 
> 
> 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/104371/">http://git.reviewboard.kde.org/r/104371/</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 17th, 2012, 5:04 p.m., <b>Martin \
Gräßlin</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/104371/diff/3/?file=55335#file55335line1684" \
style="color: black; font-weight: bold; text-decoration: \
underline;">kwin/useractions.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 3)

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

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

   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
"></pre></td>  <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: \
0; ">void Workspace::slotInvertScreen()</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">1684</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="k">if</span> <span class="p">(</span><span class="n">effects</span><span \
class="p">)</span></pre></td>  </tr>

  <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">1685</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="k">if</span> <span class="p">(</span><span class="n">Effect</span> <span \
class="o">*</span><span class="n">inverter</span> <span class="o">=</span> <span \
class="k">static_cast</span><span class="o">&lt;</span><span \
class="n">EffectsHandlerImpl</span><span class="o">*&gt;</span><span \
class="p">(</span><span class="n">effects</span><span class="p">)</span><span \
class="o">-&gt;</span><span class="n">provides</span><span class="p">(</span><span \
class="n">Effect</span><span class="o">::</span><span \
class="n">ScreenInversion</span><span class="p">))</span> <span \
class="p">{</span></pre></td>  </tr>

  <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">1686</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">kDebug</span><span class="p">(</span><span class="mi">1212</span><span \
class="p">)</span> <span class="o">&lt;&lt;</span> <span class="s">&quot;inverting \
screen using Effect plugin&quot;</span><span class="p">;</span></pre></td>  </tr>

  <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">1687</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">QMetaObject</span><span class="o">::</span><span \
class="n">invokeMethod</span><span class="p">(</span><span \
class="n">inverter</span><span class="p">,</span> <span \
class="s">&quot;toggleScreenInversion&quot;</span><span class="p">,</span> <span \
class="n">Qt</span><span class="o">::</span><span \
class="n">DirectConnection</span><span class="p">);</span></pre></td>  </tr>

  <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">1688</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <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;">minor nitpick: the \
second if is not indented.</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;">ftr: i \
actually never indent the second if, if i &quot;abuse&quot; if for an \
&quot;&amp;&amp;&quot;

-&gt; i put the entire thing into a regular block
if () {
   if () {
   }
}</pre>
<br />




<p>- Thomas</p>


<br />
<p>On March 30th, 2012, 9:13 p.m., Thomas Lübking 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, Martin Gräßlin and Fredrik Höglund.</div>
<div>By Thomas Lübking.</div>


<p style="color: grey;"><i>Updated March 30, 2012, 9:13 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;">As proposed this allows to invert the screen with zero overhead or \
requirement of OpenGL compositing. The patch depends on \
https://git.reviewboard.kde.org/r/103058/ which adds the libXxf86vm dependency (until \
i link out that nvidia refreshrate detection part)

Notice that it inverts the display colors - one cannot make an inverted screenshot \
this way.</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;">Inverts the screen. However there&#39;s an issue with the screen \
parameter. Neither active_screen nor QX11Info().screen() does work (unless on the \
primary screen, &quot;0&quot;) - at least not on a TwinView setup. We have to try \
xrandr and xinerama, but it will linkey only work on independent screens or even X11 \
servers *shrug*</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/effects.h <span style="color: grey">(994a89c)</span></li>

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

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

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

 <li>kwin/kwinbindings.cpp <span style="color: grey">(3284cf0)</span></li>

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

 <li>kwin/useractions.cpp <span style="color: grey">(09e18c3)</span></li>

 <li>kwin/workspace.h <span style="color: grey">(2e400ea)</span></li>

</ul>

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