Bug 1071 - Fix AnimatorBase.finishLifecycleAction(): Non blocking call shall return true, success.
Summary: Fix AnimatorBase.finishLifecycleAction(): Non blocking call shall return true...
Status: RESOLVED FIXED
Alias: None
Product: Jogl
Classification: JogAmp
Component: core (show other bugs)
Version: 2.3.0
Hardware: All all
: --- major
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2014-09-20 21:20 CEST by Sven Gothel
Modified: 2019-03-29 17:54 CET (History)
1 user (show)

See Also:
Type: DEFECT
SCM Refs:
424066616b085b36d88a39d56a618ea57cebc9e9 fa0115efb3989c28af21fc5f570ae49723566107
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2014-09-20 21:20:27 CEST
Non blocking call shall return true, success,
otherwise pause()/.. return value is inconsistent.

Caller of e.g. pause() running on the anim-thread or AWT-EDT (AWTAnimatorImpl)
will be non-blocking.

Before this change, a non-blocking simply did not wait until the 'hold' condition is reached
and returned its negated value.
This ofc is 'false', indicated unsuccessful operation.

Caller use the return value to determine whether the call actually paused (or ..)
the animator. Despite the non-blocking nature, the pause state was set, even if not reached.

Hence a resume() would be required to continue operation after a temporary pause.
Comment 1 Sven Gothel 2014-09-20 21:20:57 CEST
424066616b085b36d88a39d56a618ea57cebc9e9

This change ignores the non-blocking nature's unmet condition.
finishLifecycleAction() returns !nok || !blocking,
i.e. either true for the reached condition (blocking) or true if non-blocking.
Blocking calls with unmet condition still return false.

+++

In case an animated GLAutoDrawableis being pulled after a non-blocking animator pause() call,
the GLAutoDrawable's implementation thread-safety must ensure proper operation.
Comment 2 Sven Gothel 2014-09-20 21:21:25 CEST
fa0115efb3989c28af21fc5f570ae49723566107

FPSAnimator: Align code and pause/resume conditions w/ Animator, simplifying review.