Introduce an EffectsHandler::animationsSupported -> bool
ClosedPublic

Authored by graesslin on Aug 10 2016, 7:49 AM.

Details

Summary

A new method to tell the effects system whether the compositor scene
is able to drive animations. E.g. on software emulation (llvmpipe) it's
better to not do any animations at all.

This information can be used by effects to adjust their behavior, e.g.
PresentWindows could skip transitions or effects can use it in their
supported check to completely disable themselves.

As a first step all scripted effects are considered to be unsupported
if animations are not supported. They inherit AnimationEffect and are
all about driving animations.

The information whether animations are supported comes from the Scene.
It's implemented in the following way:

  • XRender: animations are always supported
  • QPainter: animations are never supported
  • OpenGL: animations are supported, except for software emulation

In addition - for easier testing - there is a new env variable
KWIN_EFFECTS_FORCE_ANIMATIONS to overwrite the selection.

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.
graesslin updated this revision to Diff 5784.Aug 10 2016, 7:49 AM
graesslin retitled this revision from to Introduce an EffectsHandler::animationsSupported -> bool.
graesslin updated this object.
graesslin edited the test plan for this revision. (Show Details)
graesslin added reviewers: KWin, Plasma.
Restricted Application added a project: KWin. · View Herald TranscriptAug 10 2016, 7:49 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
graesslin updated this revision to Diff 5847.Aug 12 2016, 6:29 AM
  • improved the check for env variable
  • BuiltIn effects start to check for it - not all yet
mart accepted this revision.Aug 15 2016, 1:47 PM
mart added a reviewer: mart.
This revision is now accepted and ready to land.Aug 15 2016, 1:47 PM
This revision was automatically updated to reflect the committed changes.