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

List:       kwin
Subject:    Re: Review Request: Optimizing Blur Part II
From:       Martin_Gräßlin <kde () martin-graesslin ! com>
Date:       2011-07-24 18:36:41
Message-ID: 20110724183641.29451.47317 () 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/101977/#review5056
-----------------------------------------------------------


The blur part I keep up for Fredrik to decide. Looking over it, I fear it w=
on't work with GLES (due to the usage of texture matrix stack).

What is the reason for adding a user option?


kwin/effects/blur/blur_config.ui
<http://git.reviewboard.kde.org/r/101977/#comment4510>

    That's very tech speak. Run a user converter over it ;-)



kwin/libkwineffects/kwinglutils.h
<http://git.reviewboard.kde.org/r/101977/#comment4508>

    Could you please add a
    @since 4.8



kwin/libkwineffects/kwinglutils.cpp
<http://git.reviewboard.kde.org/r/101977/#comment4509>

    glPopAttrib() (and pushAttrib) is not available in OpenGL ES. You need =
to
    #ifndef KWIN_HAVE_OPENGLES
    glPopAttrib();
    #endif
    =

    Also ensure that you don't have anything which requires the pop attrib.=
 E.g. the viewport needs to be reset to the previous value.


- Martin


On July 17, 2011, 4:23 p.m., Philipp Knechtges wrote:
> =

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

> (Updated July 17, 2011, 4:23 p.m.)
> =

> =

> Review request for kwin, Martin Gr=C3=A4=C3=9Flin and Fredrik H=C3=B6glun=
d.
> =

> =

> Summary
> -------
> =

> This patch adds an optional texture cache to the blur effect. The texture=
 cache allows one to partially repaint the blurred region
> if the region or a window on top it is damaged. This patch does not chang=
e anything on the behavior of the blur effect if caching is turned off.
> =

> Some facts about the texture cache:
> - It does not a full cache of the window's background. To achieve this on=
e would have to shrink the clip of all following windows which results in l=
ess performance.
> - We only cache the horizontally blurred texture. I didnt test whether it=
 is better to cache the full result.
> - For every window we have to keep a texture of the size of the blurred a=
rea in the GFX memory.
> =

> Although we so far only cache all windows or none the prePaintWindow func=
tion is designed to add the possibility to decide on a per-window basis whi=
ch window
> should be cached. But IMO this is not worth the effort cause the extra me=
musage isnt that high.
>  =

> =

> =

> Diffs
> -----
> =

>   kwin/effects/blur/blur.h 3c0922b =

>   kwin/effects/blur/blur.cpp 83012b1 =

>   kwin/effects/blur/blur_config.cpp 0612599 =

>   kwin/effects/blur/blur_config.ui 3b99afd =

>   kwin/effects/blur/blurshader.h 4308be9 =

>   kwin/effects/blur/blurshader.cpp e7e5bf3 =

>   kwin/libkwineffects/kwinglutils.h 0c86212 =

>   kwin/libkwineffects/kwinglutils.cpp f8a6058 =

> =

> Diff: http://git.reviewboard.kde.org/r/101977/diff
> =

> =

> Testing
> -------
> =

> =

> Thanks,
> =

> Philipp
> =

>


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





 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">The blur part I keep up \
for Fredrik to decide. Looking over it, I fear it won&#39;t work with GLES (due to \
the usage of texture matrix stack).

What is the reason for adding a user option?</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/101977/diff/2/?file=27279#file27279line80" \
style="color: black; font-weight: bold; text-decoration: \
underline;">kwin/effects/blur/blur_config.ui</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; \
"></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">80</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">      \
&lt;string&gt;Cache the blurred background texture.&lt;/string&gt;</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;">That&#39;s \
very tech speak. Run a user converter over it ;-)</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/101977/diff/2/?file=27282#file27282line402" \
style="color: black; font-weight: bold; text-decoration: \
underline;">kwin/libkwineffects/kwinglutils.h</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; \
">public:</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">402</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="cm">     **/</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;">Could you \
please add a @since 4.8</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/101977/diff/2/?file=27283#file27283line934" \
style="color: black; font-weight: bold; text-decoration: \
underline;">kwin/libkwineffects/kwinglutils.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 \
GLRenderTarget::enable()</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">934</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">glPopAttrib</span><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;">glPopAttrib() (and pushAttrib) is not available in OpenGL ES. You need \
to #ifndef KWIN_HAVE_OPENGLES
glPopAttrib();
#endif

Also ensure that you don&#39;t have anything which requires the pop attrib. E.g. the \
viewport needs to be reset to the previous value.</pre> </div>
<br />



<p>- Martin</p>


<br />
<p>On July 17th, 2011, 4:23 p.m., Philipp Knechtges 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 Philipp Knechtges.</div>


<p style="color: grey;"><i>Updated July 17, 2011, 4:23 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;">This patch adds an optional texture cache to the blur effect. The \
texture cache allows one to partially repaint the blurred region if the region or a \
window on top it is damaged. This patch does not change anything on the behavior of \
the blur effect if caching is turned off.

Some facts about the texture cache:
- It does not a full cache of the window&#39;s background. To achieve this one would \
                have to shrink the clip of all following windows which results in \
                less performance.
- We only cache the horizontally blurred texture. I didnt test whether it is better \
                to cache the full result.
- For every window we have to keep a texture of the size of the blurred area in the \
GFX memory.

Although we so far only cache all windows or none the prePaintWindow function is \
designed to add the possibility to decide on a per-window basis which window should \
be cached. But IMO this is not worth the effort cause the extra memusage isnt that \
high.  </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/blur/blur.h <span style="color: grey">(3c0922b)</span></li>

 <li>kwin/effects/blur/blur.cpp <span style="color: grey">(83012b1)</span></li>

 <li>kwin/effects/blur/blur_config.cpp <span style="color: \
grey">(0612599)</span></li>

 <li>kwin/effects/blur/blur_config.ui <span style="color: grey">(3b99afd)</span></li>

 <li>kwin/effects/blur/blurshader.h <span style="color: grey">(4308be9)</span></li>

 <li>kwin/effects/blur/blurshader.cpp <span style="color: grey">(e7e5bf3)</span></li>

 <li>kwin/libkwineffects/kwinglutils.h <span style="color: \
grey">(0c86212)</span></li>

 <li>kwin/libkwineffects/kwinglutils.cpp <span style="color: \
grey">(f8a6058)</span></li>

</ul>

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