This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[core] Add changes to respect minzoom and maxzoom
This adds only the changes made in #5828 to address the issue where the style zoom levels were not respected when deciding when to render a layer.
- Loading branch information
Showing
3 changed files
with
8 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,9 +11,12 @@ bool Layer::Impl::hasRenderPass(RenderPass pass) const { | |
return bool(passes & pass); | ||
} | ||
|
||
bool Layer::Impl::needsRendering() const { | ||
return passes != RenderPass::None && visibility != VisibilityType::None; | ||
} | ||
bool Layer::Impl::needsRendering(float zoom) const { | ||
return passes != RenderPass::None | ||
&& visibility != VisibilityType::None | ||
&& minZoom <= zoom | ||
&& maxZoom >= zoom; | ||
} | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
tmpsantos
Contributor
|
||
|
||
} // namespace style | ||
} // namespace mbgl |
This file contains 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
This file contains 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
1 comment
on commit e643ffe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@1ec5 @tmpsantos Since it seems like we probably want to make a patch release today, I went ahead and manually pulled these changes in to the iOS release branch since the current iOS release branch is very far behind master.
Weird indentation here.