summaryrefslogtreecommitdiff
path: root/src/mbgl/util/clip_id.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [core] move Painter and dependents to new *TileID classesKonstantin Käfer2016-05-101-147/+0
|
* [core] add algorithm for generating clip IDs based on the new TileID classesKonstantin Käfer2016-05-101-0/+4
|
* [core] abort searching children when lower bound has different wKonstantin Käfer2016-02-251-1/+1
| | | | | | | | | | | When looking for child tiles that cover a parent tile, we're computing the lower bound of the child tile in the set of tiles. Three things can happen: - all remaining tiles are sorted before the child tile we're looking for. in that case, there can not be a child tile. - the lower bound is the child tile; in this case, we want to continue checking the other children of the parent tile. - the lower bound isn't the child tile we're looking for, but there are still tiles sorted after the tile we were looking for. these could be four children of the child tile we're looking for, so we're recursively descending. what the current algorithm didn't take into account so far is that tiles with a higher w number (i.e. tiles that are outside the "main" tile pyramid of 0/0/0) were always sorted *after* the current w number. this meant that we thought there were still remaining children to be checked, so continued our recursive descent until eventually the number overflowed and we aborted our search. unfortunately, on Android this recursive descent and accompanying overflow caused a crash. this patch fixes this by making sure that before we're continuing to descent, we're sure that the w numbers match: all tiles with a different (= higher) w number essentially mean the same as "all remaining tiles are sorted before the child tile we're looking for" for the purpose of finding covering children
* [core] Organize files that were in map folder betterJohn Firebaugh2016-02-111-1/+1
| | | | Fixes #996
* [core] compute the actual clipping masks that we have to draw with getStencils()Konstantin Käfer2016-02-101-27/+84
|
* [core] add namespace comment to closing braceKonstantin Käfer2015-12-031-1/+1
|
* Replace size() with empty() whenever possibleBruno de Oliveira Abinader2015-07-291-1/+1
| | | | | | Before C++11, std::list's implementation of size was O(n). It should be all O(1) now, but it is probably still a good idea to use empty() to emphasize the intend.
* make sure bit shifts happen with unsigned integersKonstantin Käfer2015-05-151-2/+2
| | | | fixes #1407 and #1408
* Move ClipID to clip_id.hpp/cppJohn Firebaugh2015-04-091-0/+97