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

Fix flicker when rendering image source #3522

Merged
merged 3 commits into from
Nov 3, 2016
Merged

Fix flicker when rendering image source #3522

merged 3 commits into from
Nov 3, 2016

Conversation

lucaswoj
Copy link
Contributor

@lucaswoj lucaswoj commented Nov 3, 2016

This PR fixes a flicker that occurs intermittently when rendering an image source. See #3519 for more info about the bug.

Launch Checklist

  • briefly describe the changes in this PR
  • write tests for all new functionality (image/default has been failing on my machine since DRY up VideoSource code #3353, this PR fixes it)
  • post benchmark scores
  • manually test the debug page

@@ -36,6 +36,8 @@ function drawRasterTile(painter, sourceCache, layer, coord) {
const tile = sourceCache.getTile(coord);
const posMatrix = painter.transform.calculatePosMatrix(coord, sourceCache.getSource().maxzoom);

if (!tile.texture) return;
Copy link
Contributor

Choose a reason for hiding this comment

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

In what cases does this happen? Should the source not include the tile in the list of renderable tiles?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea. I can rejigger things to make that the case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in b5eef27

@lucaswoj
Copy link
Contributor Author

lucaswoj commented Nov 3, 2016

benchmark master f829bd0 raster-3519 4bf31de
map-load 155 ms 116 ms
style-load 125 ms 127 ms
buffer 991 ms 1,015 ms
fps 60 fps 60 fps
frame-duration 4.4 ms, 0% > 16ms 4.3 ms, 0% > 16ms
query-point 0.84 ms 0.90 ms
query-box 70.75 ms 71.92 ms
geojson-setdata-small 10 ms 4 ms
geojson-setdata-large 239 ms 241 ms

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