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

CanvasSource coordinates inverted in 0.40.0 #5300

Closed
gpbmike opened this issue Sep 14, 2017 · 1 comment
Closed

CanvasSource coordinates inverted in 0.40.0 #5300

gpbmike opened this issue Sep 14, 2017 · 1 comment

Comments

@gpbmike
Copy link
Contributor

gpbmike commented Sep 14, 2017

mapbox-gl-js version: 0.40.0

Steps to Trigger Behavior

  1. Add canvas layer to map with coordinates order top left, top right, bottom right, bottom left per spec.

Expected Behavior

Canvas layer should render in desired location.

Actual Behavior

Canvas layer is rotated and flipped. If you use the following order the canvas layer will render correctly: bottom left, bottom right, top right, top left.

Here's a giphy that compares v0.37.0 (first, smooth fps) to v0.40.0 (second, choppy fps). Notice the colored layer is positioned differently in the second example.

Framerate issues addressed here: #5301

@lbud
Copy link
Contributor

lbud commented Sep 14, 2017

omg the internet 💀 — webgl.readPixels and canvas ImageData are inverted 🤕 so adding an intermediary image buffer to mitigate GPU-specific rendering issues introduced this, and I apparently didn't have any vertically asymmetrical test canvas pages to catch this 🤦‍♀️

Fixing in #5303, which will be included in a patch release within the next week.

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

No branches or pull requests

2 participants