Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit 44b960f

Browse files
jfirebaughbrunoabinader
authored andcommitted
[core] Scale tile cache size based on tile size
1 parent 19bd68d commit 44b960f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mbgl/style/source_impl.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ void Source::Impl::updateTiles(const UpdateParameters& parameters) {
141141

142142
if (type != SourceType::Annotations && cache.getSize() == 0) {
143143
size_t conservativeCacheSize =
144-
std::max((float)parameters.transformState.getSize().width / util::tileSize, 1.0f) *
145-
std::max((float)parameters.transformState.getSize().height / util::tileSize, 1.0f) *
144+
std::max((float)parameters.transformState.getSize().width / tileSize, 1.0f) *
145+
std::max((float)parameters.transformState.getSize().height / tileSize, 1.0f) *
146146
(parameters.transformState.getMaxZoom() - parameters.transformState.getMinZoom() + 1) *
147147
0.5;
148148
cache.setSize(conservativeCacheSize);

0 commit comments

Comments
 (0)