[Aurorae] Don't delay initial blit.
ClosedPublic

Authored by davidedmundson on Aug 21 2019, 9:43 PM.

Details

Summary

Aurorae has a timer between request update and updating the contents.
This makes some sense.

However on initial creation we want to snap the contents immediately as
otherwise we may be out by a frame between a new window being mapped and
the window decoration being rendered.

Test Plan

Ran with Auroae
Windows opened immediately seemed to have a deco straight away

Diff Detail

Repository
R108 KWin
Branch
master
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 15481
Build 15499: arc lint + arc unit
davidedmundson created this revision.Aug 21 2019, 9:43 PM
Restricted Application added a project: KWin. · View Herald TranscriptAug 21 2019, 9:43 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
davidedmundson requested review of this revision.Aug 21 2019, 9:43 PM

The only possible regression could be some implicit assumption somewhere that this will be handled in the event loop. I had this problem with my compositing work and had to do a QTimer::singleShot with 0 duration (otherwise segfaulted somewhere in Effects system). You think this can't be a problem here?

pino added a subscriber: pino.Aug 22 2019, 4:49 AM

FWIW there is a typo in the commit title: "Aurorea" -> "Aurorae"

pino removed a subscriber: pino.Aug 22 2019, 4:49 AM

From a QtQuick POV, I can be fairly confident everything will be fine.

On the Kwin side, its already evaluating the bindings at this point, so I don't envision anything that could crash - at most we'll trigger a repaint which isn't much worse than the current state.

I did give it a bit of a test on a range of decos and actions.

davidedmundson retitled this revision from [Aurorea] Don't delay initial blit. to [Aurorae] Don't delay initial blit..Aug 22 2019, 9:32 AM
zzag added a subscriber: zzag.Aug 22 2019, 10:45 AM
zzag added inline comments.
plugins/kdecorations/aurorae/src/aurorae.cpp
375

We can't do this here because m_view hasn't been resized yet.

Color attachment is considered to be incomplete if its width or height is less than 1.

https://gitlab.freedesktop.org/mesa/mesa/blob/master/src/mesa/main/fbobject.c#L856

Heh, on lovely nvidia that doesn't cause an issue

Extra testing done:

  • checked size was valid in the first call and added an assert. It now is.
  • temporarily removed connections to requestUpdate so that we would only show our first buffer It rendered something that was fine
zzag accepted this revision.Aug 22 2019, 7:58 PM
zzag added inline comments.
plugins/kdecorations/aurorae/src/aurorae.cpp
610–640

Indent this code with 4 spaces, rather than 8.

This revision is now accepted and ready to land.Aug 22 2019, 7:58 PM
This revision was automatically updated to reflect the committed changes.