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

List:       kwin
Subject:    Re: Review Request: add screen inversion through XF86VidModeSetGammaRamp
From:       Martin_Gräßlin <kde () martin-graesslin ! com>
Date:       2012-04-17 17:04:50
Message-ID: 20120417170450.9753.72486 () 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/104371/#review12592
-----------------------------------------------------------

Ship it!


In general a ship it except for the two minor coding stylish issues :-)


kwin/effects/invert/invert.cpp
<http://git.reviewboard.kde.org/r/104371/#comment9859>

    minor nitpick: coding style wants opening { for methods in own line



kwin/useractions.cpp
<http://git.reviewboard.kde.org/r/104371/#comment9860>

    minor nitpick: the second if is not indented.


- Martin Gr=C3=A4=C3=9Flin


On March 30, 2012, 9:13 p.m., Thomas L=C3=BCbking 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=C3=A4=C3=9Flin and Fredrik H=C3=B6glun=
d.
> =

> =

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

> As proposed this allows to invert the screen with zero overhead or requir=
ement 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 detect=
ion part)
> =

> Notice that it inverts the display colors - one cannot make an inverted s=
creenshot 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 indep=
endent screens or even X11 servers *shrug*
> =

> =

> Thanks,
> =

> Thomas L=C3=BCbking
> =

>


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



 <p>Ship it!</p>



 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">In general a ship it \
except for the two minor coding stylish issues :-)</pre>  <br />





<div>




<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=55332#file55332line166" \
style="color: black; font-weight: bold; text-decoration: \
underline;">kwin/effects/invert/invert.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="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">void \
InvertEffect::toggleWindow()</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">166</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="kt">bool</span> <span class="n">InvertEffect</span><span \
class="o">::</span><span class="n">provides</span><span class="p">(</span><span \
class="n">Feature</span> <span class="n">f</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">167</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="k">return</span> <span class="n">f</span> <span class="o">==</span> <span \
class="n">ScreenInversion</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">168</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="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">minor \
nitpick: coding style wants opening { for methods in own line</pre> </div>
<br />

<div>




<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="margin-left: 2em; 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> </div>
<br />



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