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

Revert CanvasSource intermediary image buffer fix #5449

Merged
merged 5 commits into from
Oct 11, 2017

Conversation

lbud
Copy link
Contributor

@lbud lbud commented Oct 11, 2017

Moving #5448 here to 🚢 in time for the next release. Thanks so much @gpbmike!

⚠️ BREAKING ⚠️: awkwardly, this reverts the breaking change introduced in #5155 and canvas sources will no longer have a contextType parameter, which is ultimately for the better, but… 😬

A recent fix for GPU related bug introduced a large performance hit to animated canvas sources. The intermediary step of copying data to an ImageData object, particularly with large canvases (my use case is 3000x3000), caused an unacceptable frame drop for my users.

This PR removes the intermediate step. The result is a dramatic increase in performance, back to 60fps.

I have confirmed that the change works with previously affected broadwell line GPUs referenced here: #4262

contextType is no longer needed when creating a canvas source.

Tests do not need an update since there is not a good way to test rendering at the moment (see #5303).

I appreciate all the effort that was put into confirming and working around the GPU issue when it was first presented. It would seem as though the work around is not needed anymore. I don't know if that's the result of a change somewhere else in the mapbox codebase or something else entirely.

@lbud lbud force-pushed the 3drobotics-broadwell-support branch from e391414 to 6fbc1b4 Compare October 11, 2017 20:07
@lbud lbud mentioned this pull request Oct 11, 2017
3 tasks
@lbud lbud requested a review from jfirebaugh October 11, 2017 20:22
@lbud lbud merged commit 490e9ce into master Oct 11, 2017
@lbud lbud deleted the 3drobotics-broadwell-support branch October 11, 2017 20:27
@gpbmike
Copy link
Contributor

gpbmike commented Oct 11, 2017

@lbud does this line need to be removed? https://github.com/mapbox/mapbox-gl-js/blob/master/flow-typed/style-spec.js#L115

I forgot to do that in my PR.

@lbud
Copy link
Contributor Author

lbud commented Oct 13, 2017

Oops, thanks for pointing that out @gpbmike! Fixed in #5454.

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