[Aurorae] Don't delay initial blit.
ClosedPublic

Authored by davidedmundson on Wed, Aug 21, 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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Wed, Aug 21, 9:43 PM
Restricted Application added a project: KWin. · View Herald TranscriptWed, Aug 21, 9:43 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
davidedmundson requested review of this revision.Wed, Aug 21, 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.Thu, Aug 22, 4:49 AM

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

pino removed a subscriber: pino.Thu, Aug 22, 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..Thu, Aug 22, 9:32 AM
zzag added a subscriber: zzag.Thu, Aug 22, 10:45 AM
zzag added inline comments.
plugins/kdecorations/aurorae/src/aurorae.cpp
374

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.Thu, Aug 22, 7:58 PM
zzag added inline comments.
plugins/kdecorations/aurorae/src/aurorae.cpp
609–639

Indent this code with 4 spaces, rather than 8.

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