<table><tr><td style="">zzag updated this revision to Diff 42505.<br />zzag added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D15514">View Revision</a></tr></table><br /><div><div><p>Introduce BoxShadowRenderer helper</p>
<p>BoxShadowRenderer is a helper to render box shadows. The main benefit of<br />
this class is that it takes care of allocating big enough shadow<br />
texture, so the resulting shadows are not clipped, etc. Also, conceptually,<br />
it makes sense to have it.</p>
<p>The box blur implementation is based on AlphaBoxBlur from Firefox, which means<br />
that the resulting shadows look quite similar to what Firefox would render.</p>
<p>With debug build, opened web browser (Firefox), and a text editor (VS Code),<br />
on average it takes less than 16ms to render decoration shadows for all sizes:</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">small: <1 ms</li>
<li class="remarkup-list-item">medium: 1-2ms</li>
<li class="remarkup-list-item">large: 5ms (+/- 1ms)</li>
<li class="remarkup-list-item">very large: 11ms (+/- 1ms)</li>
</ul>
<p>Things to do:</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">revise shadow params (shadows are rendered slightly differently now)</li>
<li class="remarkup-list-item">clean up the code</li>
</ul></div></div><br /><div><strong>REPOSITORY</strong><div><div>R31 Breeze</div></div></div><br /><div><strong>CHANGES SINCE LAST UPDATE</strong><div><a href="https://phabricator.kde.org/D15514?vs=42295&id=42505">https://phabricator.kde.org/D15514?vs=42295&id=42505</a></div></div><br /><div><strong>BRANCH</strong><div><div>zzag/box-shadow-helper-box-blur</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D15514">https://phabricator.kde.org/D15514</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>CMakeLists.txt<br />
cmake/Modules/FindFFTW.cmake<br />
kdecoration/breezedecoration.cpp<br />
kstyle/breezeshadowhelper.cpp<br />
libbreezecommon/CMakeLists.txt<br />
libbreezecommon/breezeboxshadowhelper.cpp<br />
libbreezecommon/breezeboxshadowhelper.h<br />
libbreezecommon/breezeboxshadowrenderer.cpp<br />
libbreezecommon/breezeboxshadowrenderer.h</div></div></div><br /><div><strong>To: </strong>zzag, KWin, Plasma<br /><strong>Cc: </strong>cfeck, ngraham, abetts, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, sebas, apol, mart<br /></div>