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

Render is only complete when no tiles are queued #13095

Merged
merged 1 commit into from
Dec 17, 2021

Conversation

ahocevar
Copy link
Member

@ahocevar ahocevar commented Dec 6, 2021

Fixes #13086.

@M393, can you please confirm that this fixes the issue? If so, I'll try to add a regression test.

@github-actions
Copy link

github-actions bot commented Dec 6, 2021

📦 Preview the examples and docs from this branch here: https://deploy-preview-13095--ol-site.netlify.app/.

@M393
Copy link
Contributor

M393 commented Dec 7, 2021

This does not work. The rendercomplete is fired prematurely because all tiles are loaded but because handleRenderComplete is called asynchronously, the tile queue state at that time does not match the state with which the last frame was rendered.

Saving the tile queue state during renderFrame_ seems to work:

frameState.hasTilesQueued = this.tileQueue_.getTilesLoading() > 0 || !this.tileQueue_.isEmpty();

@ahocevar
Copy link
Member Author

ahocevar commented Dec 7, 2021

@M393 Thanks for the feedback and suggestion. I updated the pull request along these lines. Can you please test again?

Copy link
Contributor

@M393 M393 left a comment

Choose a reason for hiding this comment

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

Seems to work 👍

@ahocevar ahocevar marked this pull request as ready for review December 16, 2021 23:08
@ahocevar
Copy link
Member Author

Unfortunately I was unable to create a regression test for this, so I'm marking this ready for review.

@ahocevar ahocevar merged commit c8cfbfc into openlayers:main Dec 17, 2021
@ahocevar ahocevar deleted the rendercomplete-tiles branch December 17, 2021 15:07
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.

rendercomplete event fires too early
3 participants