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

[Layout transition] Invalidate calculated layout if transitioning using the same size range #464

Merged

Conversation

nguyenhuy
Copy link
Member

As reported in #463. It's possible that -transitionLayoutWithSizeRange: can be called with the same size range used for previous layout passes. In that case, it's necessary to invalidate the current layout to avoid it being reused later on in the process.

@nguyenhuy nguyenhuy force-pushed the HNInvalidateTransitionedLayout branch 2 times, most recently from 8d446db to e8f840b Compare July 22, 2017 06:08
- It's possible that -transitionLayoutWithSizeRange: can be called with the same size range used for previous layout passes. In that case, it's necessary to invalidate the current layout to avoid it being reused later on in the process.
@nguyenhuy nguyenhuy force-pushed the HNInvalidateTransitionedLayout branch from e8f840b to 4e516b8 Compare July 22, 2017 06:09
Copy link
Contributor

@maicki maicki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nguyenhuy I guess you tested it very thoroughly with Pinterest, except a small comment it looks good to me.

return;
}

if (ASHierarchyStateIncludesLayoutPending(_hierarchyState)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can there be any problems if we call ASHierarchyStateIncludesLayoutPending while holding the lock?

Copy link
Member

@Adlai-Holler Adlai-Holler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, this is a sensible balance between never invalidating the layout, and always invalidating it which should avoid infinite layout loops.

@Adlai-Holler Adlai-Holler merged commit 8b397cd into TextureGroup:master Jul 24, 2017
bernieperez pushed a commit to AtomTickets/Texture that referenced this pull request Apr 25, 2018
…ng the same size range (TextureGroup#464)

* Invalidate the calculated layout transitioning using the same size range
- It's possible that -transitionLayoutWithSizeRange: can be called with the same size range used for previous layout passes. In that case, it's necessary to invalidate the current layout to avoid it being reused later on in the process.

* Fix CHANGELOG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants