Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8237975: Non-embedded Animations do not play backwards after being paused #98

Conversation

@nlisker
Copy link
Contributor

nlisker commented Jan 28, 2020

8236858 (Animations do not play backwards after being paused) has been split to deal with embedded and not embedded animations. This is a fix for the latter.
The reason for the split is that embedded animations have a much more complex behavior. The current state of the relation between an animation and its clip envelope is already messy and should be corrected, even more so for embedded animations whose parent controls their behavior as well (sometimes in conflict with the child's clip envelope). This will require a redesign which can be discussed for 15. See the parent issue 8210238 for the list of bugs that arise from it.

This simple fix allows to change the current rate of a ClipEnvelope also when the animations is PAUSED. A possible issue with this approach is that it changes the buggy behavior of embedded animations to a different buggy behavior.

A concept test has been added, but it does not work yet since the mock clip envelope does not have sufficient behavior (doTimePulse does not actually do a time pulse). Open for ideas on how to make it simple, otherwise I will add a method to set a clip envelope and create a new one ad-hoc.

Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

JDK-8237975: Non-embedded Animations do not play backwards after being paused

Approvers

  • Kevin Rushforth (kcr - Reviewer)
  • Ambarish Rapte (arapte - Reviewer)
@nlisker nlisker marked this pull request as ready for review Jan 28, 2020
@bridgekeeper
Copy link

bridgekeeper bot commented Jan 28, 2020

👋 Welcome back nlisker! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request (refresh this page to view it).

@openjdk openjdk bot added the rfr label Jan 28, 2020
@nlisker
Copy link
Contributor Author

nlisker commented Jan 28, 2020

👋 Welcome back nlisker! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request (refresh this page to view it).

Maybe the Skara team would like to change the message to apply to the correct branch - jfx14 and not master.

@mlbridge
Copy link

mlbridge bot commented Jan 28, 2020

Webrevs

@kevinrushforth
Copy link
Member

kevinrushforth commented Jan 28, 2020

Maybe the Skara team would like to change the message to apply to the correct branch - jfx14 and not master.

I filed https://bugs.openjdk.java.net/browse/SKARA-249 to track this.

@kevinrushforth
Copy link
Member

kevinrushforth commented Jan 28, 2020

/reviewers 2

@kevinrushforth kevinrushforth self-assigned this Jan 28, 2020
@openjdk
Copy link

openjdk bot commented Jan 28, 2020

@kevinrushforth
The number of required reviews for this PR is now set to 2 (with at least 1 of role reviewers).

@kevinrushforth kevinrushforth self-requested a review Jan 28, 2020
Copy link
Member

kevinrushforth left a comment

I'll look at it in more detail, but had two questions come up while looking at the fix. One is related to the fix, and one is preexisting.

Copy link
Member

kevinrushforth left a comment

The fix looks fine, and all my testing looks good, too. I don't have a good recommendation for the test...I'd go with whatever is easiest for jfx14 and address it more completely in 15 when you address some of the design issues you raised.

@nlisker
Copy link
Contributor Author

nlisker commented Jan 31, 2020

The concept test is now realized. Note that I test on SingleLoopClipEnvelope only, but it is the exact same logic in the other 2 (that piece of code should have been pulled out to ClipEnvelope, but it will wait for the redesign).

Without the patch the test fails with the value of 5 instead of 3 because the current rate is not updated to be negative: 4 + 5 * (+0.2) = 5

Copy link
Member

kevinrushforth left a comment

Looks good.

@kevinrushforth
Copy link
Member

kevinrushforth commented Jan 31, 2020

@arapte can you be the second reviewer for this?

@arapte
arapte approved these changes Feb 3, 2020
Copy link

arapte left a comment

Looks good to me too.

@openjdk
Copy link

openjdk bot commented Feb 3, 2020

@nlisker This change now passes all automated pre-integration checks. When the change also fulfills all project specific requirements, type /integrate in a new comment to proceed. After integration, the commit message will be:

8237975: Non-embedded Animations do not play backwards after being paused

Reviewed-by: kcr, arapte
  • If you would like to add a summary, use the /summary command.
  • To credit additional contributors, use the /contributor command.
  • To add additional solved issues, use the /solves command.

Since the source branch of this PR was last updated there have been 4 commits pushed to the jfx14 branch. Since there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid automatic rebasing, please merge jfx14 into your branch, and then specify the current head hash when integrating, like this: /integrate 2ab40c1cd4496143b0b4391b1f3312a7bc34c921.

➡️ To integrate this PR with the above commit message, type /integrate in a new comment.

@openjdk openjdk bot added the ready label Feb 3, 2020
@nlisker
Copy link
Contributor Author

nlisker commented Feb 3, 2020

/integrate

@openjdk openjdk bot closed this Feb 3, 2020
@openjdk openjdk bot added integrated and removed ready labels Feb 3, 2020
@openjdk
Copy link

openjdk bot commented Feb 3, 2020

@nlisker The following commits have been pushed to jfx14 since your change was applied:

  • 2ab40c1: 8231513: JavaFX cause Keystroke Receiving prompt on MacOS 10.15 (Catalina)
  • 1823f6e: 8088198: Exception thrown from snapshot if dimensions are larger than max texture size
  • 5a0e71b: 8237372: NullPointerException in TabPaneSkin.stopDrag
  • 79fc0d0: 8232824: Removing TabPane with strong referenced content causes memory leak from weak one

Your commit was automatically rebased without conflicts.

Pushed as commit 1749e85.

@openjdk openjdk bot removed the rfr label Feb 3, 2020
@nlisker nlisker deleted the nlisker:8237975_Non-embedded_Animations_do_not_play_backwards_after_being_paused branch Feb 3, 2020
@mlbridge
Copy link

mlbridge bot commented Feb 3, 2020

Mailing list message from Nir Lisker on openjfx-dev:

Changeset: 1749e85
Author: Nir Lisker <nlisker at openjdk.org>
Date: 2020-02-03 12:29:43 +0000
URL: https://git.openjdk.java.net/jfx/commit/1749e854

8237975: Non-embedded Animations do not play backwards after being paused

Reviewed-by: kcr, arapte

! modules/javafx.graphics/src/main/java/com/sun/scenario/animation/shared/ClipEnvelope.java
! modules/javafx.graphics/src/main/java/com/sun/scenario/animation/shared/FiniteClipEnvelope.java
! modules/javafx.graphics/src/main/java/com/sun/scenario/animation/shared/InfiniteClipEnvelope.java
! modules/javafx.graphics/src/main/java/com/sun/scenario/animation/shared/SingleLoopClipEnvelope.java
! modules/javafx.graphics/src/shims/java/com/sun/scenario/animation/shared/SingleLoopClipEnvelopeShim.java
! modules/javafx.graphics/src/shims/java/javafx/animation/AnimationShim.java
! modules/javafx.graphics/src/test/java/test/javafx/animation/AnimationSetRateTest.java

@mlbridge
Copy link

mlbridge bot commented Feb 3, 2020

Mailing list message from Nir Lisker on openjfx-dev:

Changeset: 1749e85
Author: Nir Lisker <nlisker at openjdk.org>
Date: 2020-02-03 12:29:43 +0000
URL: https://git.openjdk.java.net/jfx/commit/1749e854

8237975: Non-embedded Animations do not play backwards after being paused

Reviewed-by: kcr, arapte

! modules/javafx.graphics/src/main/java/com/sun/scenario/animation/shared/ClipEnvelope.java
! modules/javafx.graphics/src/main/java/com/sun/scenario/animation/shared/FiniteClipEnvelope.java
! modules/javafx.graphics/src/main/java/com/sun/scenario/animation/shared/InfiniteClipEnvelope.java
! modules/javafx.graphics/src/main/java/com/sun/scenario/animation/shared/SingleLoopClipEnvelope.java
! modules/javafx.graphics/src/shims/java/com/sun/scenario/animation/shared/SingleLoopClipEnvelopeShim.java
! modules/javafx.graphics/src/shims/java/javafx/animation/AnimationShim.java
! modules/javafx.graphics/src/test/java/test/javafx/animation/AnimationSetRateTest.java

@nlisker
Copy link
Contributor Author

nlisker commented Feb 3, 2020

@rwestberg The bot sent a duplicate changeset message. Happened on #103 and #102 too. However, for #101 I don't see such a message.

@rwestberg
Copy link
Member

rwestberg commented Feb 4, 2020

Thanks, looks like the initial fix for this issue wasn't complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.