Diffusion KWin e02573263f72

[libkwineffects] Introduce timeline redirect modes

Authored by zzag on Oct 24 2018, 9:11 AM.

Description

[libkwineffects] Introduce timeline redirect modes

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).

Reviewers: KWin, graesslin

Reviewed By: KWin, graesslin

Subscribers: kwin

Tags: KWin

Differential Revision: https://phabricator.kde.org/D16447

Details

Committed
zzagNov 17 2018, 11:43 AM
Reviewer
KWin
Differential Revision
D16447: [libkwineffects] Introduce timeline redirect modes
Parents
R108:aa58a8c4ddcf: SVN_SILENT made messages (.desktop file) - always resolve ours
Branches
Unknown
Tags
Unknown