This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
Determine need for clip ID based on actual layers/tiles - #10198
Merged
Merged
Conversation
brunoabinader
self-requested a review
October 16, 2017 18:25
kkaefer
commented
Oct 16, 2017
| if (bucket) { | ||
| sortedTilesForInsertion.emplace_back(tile); | ||
| tile.used = true; | ||
| if (!symbolLayer || parameters.mapMode == MapMode::Still) { |
Member
Author
There was a problem hiding this comment.
This should be improved to exclude clipping for raster tiles as well. We could also add a virtual call to the Render*Layer object.
Contributor
There was a problem hiding this comment.
Contributor
There was a problem hiding this comment.
Can you add a comment here explaining why clipping is not needed for symbol layers, unless it's still mode?
jfirebaugh
approved these changes
Oct 17, 2017
| if (bucket) { | ||
| sortedTilesForInsertion.emplace_back(tile); | ||
| tile.used = true; | ||
| if (!symbolLayer || parameters.mapMode == MapMode::Still) { |
Contributor
There was a problem hiding this comment.
Can you add a comment here explaining why clipping is not needed for symbol layers, unless it's still mode?
kkaefer
force-pushed
the
10198-dont-generate-clip-ids-needlessly
branch
from
October 17, 2017 19:28
4fa976e to
f9661ad
Compare
kkaefer
force-pushed
the
10198-dont-generate-clip-ids-needlessly
branch
from
October 17, 2017 20:49
f9661ad to
28bf50f
Compare
This was referenced Oct 17, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When generating clip IDs for our stencil buffer based clipping approach, we are currently looking at the tiles of a particular source. Instead, we should only consider layers that actually need clipping (lines, fills, extrusions) rather than blindly generating clip IDs for every tile.
An example: A vector tile source is only used in symbol layers (which don't require clipping). Since we're currently generating clip IDs for all tiles in a geometry source (but not a raster source), we'd still generate clip IDs for these tiles even though they're never used.