summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* [core] Build fixThiago Marcos P. Santos2016-02-261-1/+1
| | | | Fix no viable conversion on OSX.
* [core] Add timeout for clock skewThiago Marcos P. Santos2016-02-261-0/+2
| | | | | | | | | | If the server keeps sending replies considered from the client in the past (there is no way to tell if the server or client clock is wrong), the client will try to interpolate a valid expiration time based on the delta of the expiration intervals sent by the server. If the intervals are always the same, exponential backoff kicks in until we get a different expiration time from what we already have.
* [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] Set initial offline tile count limit to 768John Firebaugh2016-02-241-1/+1
|
* [core] Limit total number of offline Mapbox tilesJohn Firebaugh2016-02-242-0/+4
|
* Merge branch 'release-ios-v3.1.0'Minh Nguyễn2016-02-245-2/+38
|\
| * [core, ios, osx] Only constrain after adding to a windowMinh Nguyễn2016-02-105-2/+38
| | | | | | | | | | | | Introduced a setter/getter for constrain mode. On iOS and OS X, the zoom level inspectable causes the zoom level to be set independently from the longitude and latitude. Thus, the latitude inspectable had no effect because the latitude was constrained to 0 at z0. Temporarily removing the heightwise constraint allows the map to center on the intended location before zooming, which is the usual case for storyboards and XIBs. On iOS, the only guarantee we have timing-wise is that all the inspectables are applied after initialization but before the view is added to a window. So we reimpose the heightwise constraint as soon as the view is added to a window, that is, before the user has a chance to pan the map out of bounds. Fixes #3868.
* | [core] use a store enum instead of RTTIKonstantin Käfer2016-02-249-5/+66
| | | | | | | | RTTI is pretty slow, in particular in iOS devices
* | [core] fix uninitialized member variableKonstantin Käfer2016-02-241-1/+1
| |
* | [core] Thread GLObjectStore through to Holder objectsJohn Firebaugh2016-02-1866-321/+313
| | | | | | | | | | | | This eliminates the reliance on ThreadContext to provide GLObjectStore, and statically enforces that GL cleanup functions happen only when GLObjectStore::performCleanup is called. With the elimination of the Map thread, this becomes important because there may be multiple GLObjectStore's per-thread, and Map will need to ensure that the correct context is active when calling GLObjectStore::performCleanup.
* | [core] Remove ThreadContext::getFileSource; instead thread FileSource throughJohn Firebaugh2016-02-1819-59/+58
| |
* | [gl] Refactor texture pool cleanupBruno de Oliveira Abinader2016-02-183-25/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Texture pool now allocates a block of 64 textures per time. Each block contains a TextureObject which handles GL object lifetime. Blocks can be added or removed according to the following rules: 1. If pool is empty, created a new block upon first call (lazy load); 2. Iterate blocks to find an available texture ID: - If found, remove that from the list of available IDs for that block and return its ID. - Othewise, allocate a new block and grab an available ID from that. 3. When releasing a texture ID, check if the associated block is free. If no IDs are currently in use, then abandon its TextureObject and remove the block from the pool.
* | [gl] Added mbgl::gl::VAOHolderBruno de Oliveira Abinader2016-02-184-31/+38
| |
* | [gl] Added mbgl::gl::Texture{,Pool}HolderBruno de Oliveira Abinader2016-02-1812-62/+98
| |
* | [gl] Added mbgl::gl::BufferHolderBruno de Oliveira Abinader2016-02-183-20/+43
| |
* | [gl] Added mbgl::gl::ShaderHolderBruno de Oliveira Abinader2016-02-184-42/+53
| |
* | [gl] Added mbgl::gl::ProgramHolderBruno de Oliveira Abinader2016-02-184-30/+59
| |
* | [gl] Moved TexturePool to gl namespaceBruno de Oliveira Abinader2016-02-1813-24/+31
| |
* | [gl] Moved GLObjectStore to gl namespaceBruno de Oliveira Abinader2016-02-1812-26/+24
| |
* | [gl] Use Buffer::getID() whenever possibleBruno de Oliveira Abinader2016-02-181-2/+2
| |
* | [gl] Use Shader::getID() whenever possibleBruno de Oliveira Abinader2016-02-1815-30/+32
| |
* | [gl] Moved VAO helpers to common headerBruno de Oliveira Abinader2016-02-181-34/+8
| |
* | [core] less slanted dashed lines near sharp cornersAnsis Brammanis2016-02-153-7/+49
| | | | | | | | port https://github.com/mapbox/mapbox-gl-js/pull/2043 from -js
* | [core] round points created by clipLines instead of truncating themAnsis Brammanis2016-02-151-8/+8
| |
* | [core] Add support for updating point annotationsGabriel Miklós2016-02-123-0/+16
| |
* | [tests] Fix buildJohn Firebaugh2016-02-111-0/+1
| |
* | [core] Organize files that were in map folder betterJohn Firebaugh2016-02-1142-53/+56
| | | | | | | | Fixes #996
* | Allow using tileSize: 512 as a switch to trade retina support for 512px ↵Young Hahn2016-02-115-11/+16
| | | | | | | | raster tiles
* | [core] use std::move() to prevent copiesKonstantin Käfer2016-02-112-3/+3
| |
* | [core] Always store tiles without ratio support with ratio = 1John Firebaugh2016-02-101-1/+2
| |
* | [core] Eliminate maximumCacheEntrySizeJohn Firebaugh2016-02-101-1/+0
| | | | | | | | Instead, the eviction policy accounts for the actual size needed for an incoming put.
* | [core] Implement an eviction policy for OfflineDatabaseJohn Firebaugh2016-02-101-30/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | When inserting an cached resource, or removing a region, remove least-recently used resources and tiles, not used by offline regions, until the used database size, as calculated by multiplying the number of in-use pages by the page size, is less than the maximum cache size minus 5 times the page size. In addition, OfflineDatabase may be configured to ignore cache puts of individual resources larger than a certain size. This policy is similar but not identical to the former SQLiteCache policy: * It accounts for offline, by exempting resources required by offline regions from eviction. * It must delete from two tables (resources and tiles), rather than one. Currently the strategy is naive: evict 50 rows at a time from each table. * It makes maximumCacheSize and maximumCacheEntrySize completely independent. The SQLiteCache implementation evicted when `usedSize > maximumCacheSize - 2 * maximumCacheEntrySize`. This evicts when `usedSize > maximumCacheSize - 5 * pageSize`. * It uses a non-unlimited default value for maximumCacheSize: 50 MB. We should have always had a limit in place; "a cache without an eviction policy is a resource leak".
* | [core] Throttle the number of concurrent requests to 20John Firebaugh2016-02-101-0/+1
| |
* | Add binary for smoke-testing offline downloadsJohn Firebaugh2016-02-101-0/+22
| |
* | [core] Interface and implementation for offlineJohn Firebaugh2016-02-101-0/+2
| |
* | [all] Don't interpret 404s on non-tile resources as "no content"John Firebaugh2016-02-107-144/+121
| |
* | [core] Reimplement existing caching within an offline-capable database schemaJohn Firebaugh2016-02-101-44/+0
| |
* | [core] Cache with mapbox:// tile URLsJohn Firebaugh2016-02-103-65/+35
| |
* | [core] Add a method for statically evaluating font stacks used by a styleJohn Firebaugh2016-02-103-0/+26
| |
* | [core] Refactor tileCoverJohn Firebaugh2016-02-109-122/+117
| |
* | [core] round() not always on std:: namespaceThiago Marcos P. Santos2016-02-101-2/+4
| | | | | | | | Build fix.
* | [core] draw clipping masks from ClipIDGenerator rather than SourcesKonstantin Käfer2016-02-105-27/+20
| |
* | [core] compute the actual clipping masks that we have to draw with getStencils()Konstantin Käfer2016-02-103-36/+99
| |
* | [core] make sure icons fit before the ends of the lineAnsis Brammanis2016-02-091-3/+13
| | | | | | | | | | | | | | This skips anchors if there is not enough room before the beginning or end of the line for the icon to fit. -js: https://github.com/mapbox/mapbox-gl-js/pull/2077/files
* | [node] add debug options to node bindingsAnsis Brammanis2016-02-082-17/+19
| | | | | | | | fix #3579
* | [core] move GL value objects from gl_config.hpp to gl_values.hppKonstantin Käfer2016-02-084-331/+101
| | | | | | | | Also removes duplicate code from gl_helper.hpp by reusing the GL values that we already have anyway.
* | [core] move platform/gl.hpp to gl/gl.hppKonstantin Käfer2016-02-0846-46/+46
|/
* [core] #509 - Creating and using MIN_ZOOM and MAX_ZOOM constantsBrad Leege2016-02-032-2/+4
|
* [core] #509 - Adding min / max checks to parameters and refactoring to ↵Brad Leege2016-02-031-14/+4
| | | | utilize clamp function
* [android][core] #509 - Setting Min and Max Zooms warning annotations in ↵Brad Leege2016-02-031-2/+16
| | | | Android. Clamping Min and Max zooms at Core GL for all platforms to use at runtime.