[libkwineffects] Introduce timeline redirect modes
ClosedPublic

Authored by zzag on Oct 27 2018, 9:13 AM.

Details

Summary

The redirect modes control behavior of the timeline when its direction
is changed at the start or target position. For example, consider the
following piece of code:

TimeLine timeLine(1000ms, TimeLine::Forward);
timeLine.setDirection(TimeLine::Backward);

What should happen when the direction of the timeline was changed to go
backward? Should the current value of the timeline go from 1 to 0, or
should the timeline stop its "execution"?

In the relaxed mode, the timeline will go from 1 to 0.
In the strict mode, the timeline will stop its execution.

Different effects may prefer different modes for source and target
positions. For example, most C++ effect would prefer relaxed mode for
source position, and strict mode for target position. On the other side,
scripted effects(AnimationEffect) would prefer strict mode for source
position, and relaxed mode for target position(because of set).

Diff Detail

Repository
R108 KWin
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 4224
Build 4242: arc lint + arc unit
zzag created this revision.Oct 27 2018, 9:13 AM
Restricted Application added a project: KWin. · View Herald TranscriptOct 27 2018, 9:13 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Oct 27 2018, 9:13 AM
zzag updated this revision to Diff 44426.Oct 29 2018, 11:07 AM

Rebase.

zzag updated this revision to Diff 44840.Nov 4 2018, 1:27 PM

Rebase.

zzag updated this revision to Diff 45645.Nov 17 2018, 11:39 AM

Rebase.

graesslin accepted this revision.Nov 17 2018, 11:41 AM
This revision is now accepted and ready to land.Nov 17 2018, 11:41 AM
This revision was automatically updated to reflect the committed changes.