summaryrefslogtreecommitdiff
path: root/include/mbgl/storage
Commit message (Collapse)AuthorAgeFilesLines
* [core] make forcing cache/network only more explicitKonstantin Käfer2017-10-123-11/+40
| | | | | | Previously, we used the existence of a `prior*` field in the Resource object as an indication for whether we should consult the cache or not. However, this is prone to error, since a failed cache lookup won't set any prior fields. Therefore, we manually set `priorExpires` to 0. This in turn triggered another bug where generated wrong expiration timestamps when the server response we got was expired (or expired between sending and receiving). This commit changes the flags so that we can now explicitly request CacheOnly/NetworkOnly (or All) loading methods, rather than the implicit Optional/Required naming scheme.
* [build] split out DefaultFileSource and dependents to a separate targetKonstantin Käfer2017-09-281-1/+0
| | | | We don't want to link it into the node bindings, so keep it in a separate target
* [test] add ability to take the OnlineFileSource offlineKonstantin Käfer2017-09-222-0/+4
| | | | This functionality is used for testing to ensure correct offline behavior when connectivity is missing.
* Fix platform dependent number type `unsigned long` -> `uint64_t`Asheem Mamoowala2017-09-201-1/+1
|
* Fast tileCount with help from @mapbox/sphericalmercator moduleAsheem Mamoowala2017-09-081-1/+3
|
* [core] finish must-revalidate supportKonstantin Käfer2017-08-082-0/+11
|
* [core] Use the ResourceTransform instead of callbacksThiago Marcos P. Santos2017-06-262-4/+10
| | | | | Based on the actor model, can be considered safer to use since we don't need to worry about object lifetime anymore.
* [core] Introduce the ResourceTransformThiago Marcos P. Santos2017-06-261-0/+26
| | | | Wrapper for transforming URLs on the OnlineFileSource.
* [core] Rename ThreadedObject to ThreadThiago Marcos P. Santos2017-06-211-2/+2
| | | | | Now that the old Thread class is gone, we can give ThreadedObject a better name.
* [core] Convert DefaultFileSource to ThreadedObjectThiago Marcos P. Santos2017-06-211-2/+2
| | | | Fixes #6426
* [core] Offline support for Image SourcesAsheem Mamoowala2017-06-011-2/+4
|
* [core] default file source - ensure thread safety for cached valuesIvo van Dongen2017-05-271-2/+7
|
* [core] default file source - ensure thread safety for local file and asset ↵Ivo van Dongen2017-05-271-2/+2
| | | | requests
* [android] use AAssetManager instead of libzipKonstantin Käfer2017-04-241-0/+3
|
* [ios] Guard against over calling pause or resumeJesse Bounds2017-03-181-3/+0
|
* [core] Cache file source base URL and access tokenJesse Bounds2017-03-011-0/+18
| | | | | This caches the base URL and access token values when they are set so that they can still be retrieved even when the thread is paused.
* [core] Add a pause/resume API to the DefaultFileSourceThiago Marcos P. Santos2017-02-251-0/+3
| | | | | It will halt the networking thread completely. Expired and error'ed tiles won't get re-requested until resume() is called again.
* [core] add ability to transform URLs before they're requested from the InternetKonstantin Käfer2017-02-202-0/+6
|
* [core] Do not consider error'ed responses freshThiago Marcos P. Santos2017-02-071-1/+1
| | | | | It has the unwanted side effect of not retrying anymore in case of error.
* [core] remove trailing whitespace, add trailing newlines, add space after //Konstantin Käfer2017-01-273-3/+3
|
* [core] LocalFileSource implementation and testsIvo van Dongen2016-09-301-0/+1
|
* [core] allow offline region metadata to be updated (#6338)Molly Lloyd2016-09-201-0/+7
|
* [core] Convert uses of std::set to std::unordered_set (#6325)Lucas Wojciechowski2016-09-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | * src/mbgl/annotation/annotation_manager.hpp * src/mbgl/algorithm/update_renderables.hpp * src/mbgl/geometry/glyph_atlas.hpp * src/mbgl/renderer/painter.cpp and src/mbgl/renderer/render_item.hpp * src/mbgl/renderer/symbol_bucket.hpp and src/mbgl/text/glyph_store.hpp * src/mbgl/sprite/sprite_atlas.hpp * include/mbgl/storage/network_status.hpp * src/mbgl/text/collision_tile.cpp * src/mbgl/style/update_batch.hpp * platform/default/mbgl/storage/offline_download.hpp * Add GlyphRangeSet typedef * Fix whitespace & unused imports
* [core] [android] - public api configurable base endpoint (#6309)Tobrun2016-09-152-0/+8
| | | add runloop to test
* [core] OnlineFileSource - rate limitIvo van Dongen2016-09-131-1/+5
|
* [core] Don't allow style mutations to be overwritten by revalidationJohn Firebaugh2016-08-231-0/+4
| | | | | * Once we get a fresh style, stop revalidating. * If the style is mutated, stop revalidating and preserve the existing mutations.
* [core] support "scheme": "tms" in TileJSON filesKonstantin Käfer2016-08-161-0/+2
|
* [core] Revert workaround for std::atomic on ARMv5Thiago Marcos P. Santos2016-07-131-3/+2
| | | | | | Got fix on r12. https://github.com/android-ndk/ndk/issues/31
* [core] Use Range<uint8_t> instead of full Tileset where possibleJohn Firebaugh2016-06-141-2/+2
|
* [tidy] Check modernize-pass-by-valueBruno de Oliveira Abinader2016-06-133-6/+6
| | | | Ref: http://clang.llvm.org/extra/clang-tidy/checks/modernize-pass-by-value.html
* [core] only perform optional requests if the FileSource supports itKonstantin Käfer2016-06-102-0/+12
|
* Merge branch 'release-android-v4.1.0'Brad Leege2016-06-091-2/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/BaseMarkerViewOptions.java # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/MarkerView.java # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/MarkerViewManager.java # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java # platform/android/src/jni.cpp # src/mbgl/geometry/buffer.hpp # src/mbgl/geometry/glyph_atlas.cpp # src/mbgl/geometry/glyph_atlas.hpp # src/mbgl/geometry/line_atlas.cpp # src/mbgl/geometry/vao.cpp # src/mbgl/gl/gl_object_store.cpp # src/mbgl/gl/gl_object_store.hpp # src/mbgl/renderer/frame_history.cpp # src/mbgl/shader/shader.cpp # src/mbgl/sprite/sprite_atlas.cpp # src/mbgl/sprite/sprite_atlas.hpp # src/mbgl/text/glyph_pbf.hpp
| * [android] #5254 - fix ARMv5 supportThiago Marcos P. Santos2016-06-061-2/+3
| | | | | | | | Backported patches fixing ARMv5 support for issue #3985.
* | [core] Rationalize naming for style-related codeJohn Firebaugh2016-06-022-3/+3
|/
* [core] use #pragma once instead of ifdef include guardsKonstantin Käfer2016-05-256-24/+6
|
* [core] move from microsecond precision timestamp to integer second precisionKonstantin Käfer2016-05-132-6/+14
|
* [core] retain tiles differently and remove old TileID classKonstantin Käfer2016-05-101-1/+1
|
* [core] Refactor getRegionCompletedStatus; add completedTileCount; add testsJohn Firebaugh2016-04-271-2/+10
|
* [ios, osx] Add a property for bytes used by offline tilesBrent Whitman2016-04-271-1/+6
|
* [core] Use the proper type for font stacksJohn Firebaugh2016-04-221-1/+2
|
* [core] Remove internal threading from OnlineFileRequestJohn Firebaugh2016-04-141-6/+2
| | | | There's no need to do the work that OnlineFileRequest does on a separate thread from the DefaultFileSource thread, and having AsyncTasks proxy to other tasks across a thread boundary adds needless complexity.
* [core] Unify FileRequest and WorkRequestJohn Firebaugh2016-03-243-9/+5
|
* [core] Remove goOffline() from DefaultFileSourceThiago Marcos P. Santos2016-03-082-3/+2
| | | | Use the newly added NetworkStatus::Set().
* [core] Add client defined network statusThiago Marcos P. Santos2016-03-081-0/+10
| | | | | | | | This API will let the client force a network status. If set to Offline, we won't make network requests. When set make to Online, it will trigger the pending requests and try to fetch tiles from the network.
* [core] Limit total number of offline Mapbox tilesJohn Firebaugh2016-02-242-0/+22
|
* [core] status.requiredResourceCountIsIndeterminate ⇢ ↵John Firebaugh2016-02-241-6/+7
| | | | | | status.requiredResourceCountIsPrecise Change the name and reverse the sense. Naming things in the positive is better than naming them in the negative.
* [core] Add a descriptive comment about maximumCacheSizeJohn Firebaugh2016-02-241-0/+7
|
* [core] use std::move() to prevent copiesKonstantin Käfer2016-02-111-1/+1
|
* [core] Eliminate maximumCacheEntrySizeJohn Firebaugh2016-02-101-2/+1
| | | | Instead, the eviction policy accounts for the actual size needed for an incoming put.
* [core] Implement an eviction policy for OfflineDatabaseJohn Firebaugh2016-02-101-20/+9
| | | | | | | | | | | | | 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".