D27788: Implement EGL_KHR_partial_update and EGL_EXT_swap_buffers_with_damage
Vlad Zahorodnii
noreply at phabricator.kde.org
Wed Apr 29 06:47:10 BST 2020
zzag added inline comments.
INLINE COMMENTS
> egl_gbm_backend.cpp:441
>
> +static QVector<EGLint> regionToRects(const QRegion &lastRegion, int height)
> +{
s/lastRegion/region/
> egl_gbm_backend.cpp:465
> + {
> + const QRegion region = (output.pendingDamagedRegions() | damagedRegion)
> + & output.output->geometry();
`damagedRegion` contains the region that will be repainted in the next frame, so we don't need to accumulate surface damages again.
I suppose we want something like
const QRegion region = damagedRegion & output.output->geometry();
> egl_gbm_backend.cpp:472
> + if (!correct) {
> + qCritical() << "failed eglSetDamageRegionKHR" << eglGetError();
> + }
Use categorized logging please. Also, it's not a critical error if eglSetDamageRegionKHR() fails. qCWarning(KWIN_DRM) would be a better choice.
> egl_gbm_backend.cpp:529-541
> +QRegion EglGbmBackend::Output::pendingDamagedRegions() const
> +{
> + QRegion region;
> + // Note: An age of zero means the buffer contents are undefined
> + if (bufferAge > 0 && bufferAge <= damageHistory.count()) {
> + for (int i = 0; i < bufferAge - 1; i++)
> + region |= damageHistory[i];
I think we can drop this method now since only EglGbmBackend::prepareRenderingForScreen() needs to accumulate damage.
REPOSITORY
R108 KWin
REVISION DETAIL
https://phabricator.kde.org/D27788
To: apol, #kwin, #plasma:_mobile, zzag
Cc: mwolff, zzag, davidedmundson, kwin, Orage, cacarry, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20200429/27b08f76/attachment-0001.html>
More information about the kwin
mailing list