[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: D15514: [libbreezecommon] Use box blur instead of FFT blur
From: Vlad Zagorodniy <noreply () phabricator ! kde ! org>
Date: 2018-09-28 17:00:51
Message-ID: 06d62787b1f981d3922f816b01944f2e () localhost ! localdomain
[Download RAW message or body]
[Attachment #2 (text/plain)]
zzag updated this revision to Diff 42505.
zzag added a comment.
Introduce BoxShadowRenderer helper
BoxShadowRenderer is a helper to render box shadows. The main benefit of
this class is that it takes care of allocating big enough shadow
texture, so the resulting shadows are not clipped, etc. Also, conceptually,
it makes sense to have it.
The box blur implementation is based on AlphaBoxBlur from Firefox, which means
that the resulting shadows look quite similar to what Firefox would render.
With debug build, opened web browser (Firefox), and a text editor (VS Code),
on average it takes less than 16ms to render decoration shadows for all sizes:
- small: <1 ms
- medium: 1-2ms
- large: 5ms (+/- 1ms)
- very large: 11ms (+/- 1ms)
Things to do:
- revise shadow params (shadows are rendered slightly differently now)
- clean up the code
REPOSITORY
R31 Breeze
CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D15514?vs=42295&id=42505
BRANCH
zzag/box-shadow-helper-box-blur
REVISION DETAIL
https://phabricator.kde.org/D15514
AFFECTED FILES
CMakeLists.txt
cmake/Modules/FindFFTW.cmake
kdecoration/breezedecoration.cpp
kstyle/breezeshadowhelper.cpp
libbreezecommon/CMakeLists.txt
libbreezecommon/breezeboxshadowhelper.cpp
libbreezecommon/breezeboxshadowhelper.h
libbreezecommon/breezeboxshadowrenderer.cpp
libbreezecommon/breezeboxshadowrenderer.h
To: zzag, #kwin, #plasma
Cc: cfeck, ngraham, abetts, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, \
ali-mohamed, jensreuterberg, sebas, apol, mart
[Attachment #3 (text/html)]
<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>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic