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 pyramid.findLoadedParent for raster rendering #2168

Merged
merged 1 commit into from
Feb 22, 2016
Merged

Conversation

ansis
Copy link
Contributor

@ansis ansis commented Feb 22, 2016

Fixes a sloppy bug introduced by e6cb15c

I didn't notice draw_raster was using findLoadedParent and I didn't test with a raster style.

fix #2167
fix #2161

👀 @mourner @lucaswoj

t.equal(pyramid._cache.order.length, 0);

// add from retained tiles
t.deepEqual(pyramid.findLoadedParent(new TileCoord(2, 0, 0), 0, {}), tile);
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this testing? It looks the same as line 669 above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

findLoadedParent looks for load parent tiles in both the cache and ._tiles (the previous set of tiles).
669 tests whether it works when the tile is in the cache
675 tests whether it works when the tile is in ._tiles
669 moves the tile from the cache to ._tiles internally which is what 672 confirms.

I'll split it up as suggested by https://github.com/mapbox/mapbox-gl-js/pull/2168/files#r53679813

@lucaswoj
Copy link
Contributor

Looks good now! :shipit: on green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants