Commit Graph

804 Commits

Author SHA1 Message Date
Mikhail Pozdnyakov
f567a79dd8 [core] Extend DefaultFileSource API
Add `packDatabase()` method and `bool pack` argument to the `deleteOfflineRegion()` method.
2019-11-12 17:24:50 +02:00
Mikhail Pozdnyakov
615e095ed6 [core] OfflineDatabase pack API
- introduce `OfflineDatabase::pack()` standing for incremental vacuum
- make pack optional at offline region deletion
- update `OfflineDatabase.DeleteRegion` test accordingly to the items above
2019-11-12 17:24:50 +02:00
Dane Springmeyer
49456e3fc1 remove duplicate formatNumber (#15908) 2019-11-12 06:47:43 -08:00
Mikhail Pozdnyakov
e1556fc539 [core] Improve OfflineDatabase error handling
- fixes missing exception handlers (e.g. runtim error from the `initialize()` method)
- introduces generic exception handling mechanism to reduce the repeated code
2019-11-11 15:33:55 +02:00
Mikko Pulkki
4176b28a77 [Linux] Remove CA certificate bundle 2019-11-11 10:11:49 +02:00
Mikhail Pozdnyakov
55e18a6f81 [core] Use expected.hpp from mapbox-base 2019-11-08 11:27:30 +02:00
Mikko Pulkki
a7a7e8cbe2 [render-test] Implement gfx probe for tracking gpu resources 2019-10-30 14:32:27 +02:00
Mikko Pulkki
fb062bb23e [render-test] Add resource usage tracking to gfx context 2019-10-30 14:32:27 +02:00
Mikhail Pozdnyakov
ab603c5fed [core] Enable incremental vacuum for Offline DB
Thus we avoid re-creating the whole database and keeping the backup file as it happens on calling VACUUM.
2019-10-22 15:51:16 +03:00
Mikko Pulkki
0ca96fd8a4 [render-test] Implement fps benchmarking tests (#15803) 2019-10-22 12:13:55 +03:00
zmiao
e829d1ae6f [test-runner] make render-test a shared lib (#15816)
* [test-runner] make render-test a shared lib

[test-runner] nit

[test-runner] nit again

* [test-runner] Remove redundant linked file in cmake
2019-10-15 19:16:32 +03:00
Thiago Marcos P. Santos
a4e1707f6b [offline] Document the database schema 2019-10-11 16:06:28 +03:00
Thiago Marcos P. Santos
990fdc43fa [build] Make sure offline_schema.hpp is up-to-date
- Get the bots to verify that.
 - Fix the paths.
2019-10-11 16:06:28 +03:00
Alexander Shalamov
e5cdc4ecf3 [core][android][darwin] Move number format to i18n 2019-09-26 10:55:47 +03:00
Alexander Shalamov
9c8295c6a6 [core][android][darwin] Move platform specific Collator impls from expression
Platform specific Collator implementations should not be part of an expression APIs.
2019-09-26 10:55:47 +03:00
Alexander Shalamov
30ffbe9b8d [core][android] Remove unaccent from platform interfaces
The unaccent is used only within collator, thus, there is no
need to have separate platform interface for it.
2019-09-26 10:55:47 +03:00
Thiago Marcos P. Santos
c7bbd5bbef [core] Fix performance-move-const-arg 2019-09-25 18:59:07 +03:00
Thiago Marcos P. Santos
3888af2460 [build] Move compression to platform
It depends on platform specific compression library.
2019-09-20 15:27:52 +03:00
Julian Rex
2b08c1d7bf [ios, macos] Fix MGLOfflinePack invalidate crash (#15582) 2019-09-18 18:13:07 -04:00
Thiago Marcos P. Santos
83a019d021 [build] Fix clang format and tidy checks 2019-09-17 12:28:55 +03:00
Thiago Marcos P. Santos
5cf2c7eb50 [build] Use the system CURL on Linux
And we don't need to use Mason anymore.
2019-09-17 12:28:55 +03:00
Thiago Marcos P. Santos
d424850257 [build] Make the default styles part of GL Native
The reason is applications using it, like GLFW, don't need
to depend on code inside platform/default.
2019-09-17 12:28:55 +03:00
Thiago Marcos P. Santos
1bd439ad82 [core] Fix build with old ICU versions
Use the old API for number formatting.
2019-09-06 16:23:15 +03:00
Bruno de Oliveira Abinader
544aabd020 [core] Add requiredTileCount to OfflineRegionStatus 2019-08-29 18:22:59 +03:00
Mikhail Pozdnyakov
42ba8a7d12 [core] const variables for OfflineDownload batch sizes 2019-08-29 17:28:51 +03:00
Mikhail Pozdnyakov
f84e46ad26 [core] Mark offline region resources in batches 2019-08-29 17:28:51 +03:00
Mikhail Pozdnyakov
0c80f3a383 [core] Add OfflineDatabase::markUsedResources() 2019-08-29 17:28:51 +03:00
Mikhail Pozdnyakov
62e1e03c09 [core] Move semantics for OfflineDownload::ensureResource() 2019-08-29 17:28:51 +03:00
Ander Conselvan de Oliveira
21632a66f8 [core] Remove programCacheDir parameter from ProgramParameters
Binary shader support has been removed in commit c2f974f2a5 ([core]
Remove binary shader support). This left-over parameter is not used
anywhere anymore.
2019-08-27 16:23:48 +03:00
Dane Springmeyer
1165f62df6 [core][test] fix leaks from sqlite usage 2019-08-16 15:51:42 +03:00
Bruno de Oliveira Abinader
6f0cda8c8b [build] Use mapbox-base optional 2019-07-29 18:36:08 +03:00
Mikhail Pozdnyakov
4c896cbb31 [core] Fix error handling in HeadlessFrontend::render() 2019-06-28 16:33:52 +03:00
Juha Alanen
0ca8ea6f16 [core] Add number-format expression 2019-06-27 15:51:22 +03:00
Bruno de Oliveira Abinader
1a9e07e4ed [core] DefaultFileSource dynamic support for cache-only requests 2019-06-25 20:10:21 +03:00
Thiago Marcos P. Santos
ea63541ad1 [core] Fix offline regions reporting the wrong number of tiles
- The SQL query used for checking if the tile was already in the
  cache was wrong.

- Tiles being refereed by two or more regions were not always
  counted as one.

Fixes #13437.
2019-06-19 17:19:10 +03:00
Thiago Marcos P. Santos
68e3cbacbc [core] Add method for setting a maximum size for the ambient cache
- Removed this parameter from the constructor, now that we
  have a method to set it.
- Add the method and enforce the limits if the ambient cache exceeds the
  size.
2019-06-18 16:26:51 +03:00
Thiago Marcos P. Santos
78eeffe171 [core] Clear/Invalidate should also work on non-tile resources
These methods were only affecting tiles, but they should really
work on every resource like style, glyphs, etc.
2019-06-18 16:26:51 +03:00
Thiago Marcos P. Santos
59e7b9a878 [core] Rename resetCache to resetDatabase
Avoid confusion about what is being reset. In this case, the whole
database and not only the ambient cache.
2019-06-18 16:26:51 +03:00
Thiago Marcos P. Santos
bf0be56946 [core] Fix bug of auto_vacuum not working 2019-06-13 22:28:16 +03:00
Thiago Marcos P. Santos
5b4bb1398b [core] Surface cache management APIs
These APIs need to be on the DefaultFileSource in order to
be visible for the SDKs bindings.
2019-06-13 22:28:16 +03:00
Thiago Marcos P. Santos
32e0b7beec [core] Add API for clearing tile cache 2019-06-13 22:28:16 +03:00
Konstantin Käfer
844299f1c3 [build] remove roundtrip through <experimental/optional> when using optional 2019-06-12 12:04:07 +02:00
Michael Muesch
774d32038f Fix namespace issue with OSMesa
HeadlessBackend seems to be part of the mbgl::gl namespace. Since OSMesaBackendImpl is only in the mbgl namespace this code does not compile.

Since this file is in the mbgl/gl folder I think it makes sense to just put the whole thing in the mbgl::gl namespace.
2019-06-10 15:13:38 +03:00
Konstantin Käfer
7f9274035b [core] refactor program object creation 2019-05-28 16:11:05 +02:00
Thiago Marcos P. Santos
cc26ef17d5 [core] Introduce usage tag for resources
Make the distinction if a resource is being requested for offline
usage or if it will be used immediately.

Fixes #14746
2019-05-28 16:30:49 +03:00
Łukasz Paczos
46ef2d86d2 [core] invoke optional resource path change completion listener 2019-05-24 15:03:55 +02:00
Łukasz Paczos
7d6255c860 [core] option to perform platform specific operations when creating/destroying core threads 2019-05-22 15:52:55 +02:00
Aleksandar Stojiljkovic
3cd8c6c1fd [core] Refactor HeadlessFrontend/Backend: GL separation and factory (#14692)
Refactor out HeadlessFrontend and HeadlessBackend gl independent code to gfx.
Define gl::HeadlessBackend as subclass, instantiated by gfx::HeadlessBackend static factory method.
GL dependent tests are still using gl::HeadlessBackend directly (not through gfx).
2019-05-21 07:37:49 +03:00
Thiago Marcos P. Santos
1def782cf2 [core] Add API for invalidating tiles
Add new APIs for invalidating tiles, effectively forcing Mapbox
GL Native to check with the servers if the tiles are valid before
using them. This is more efficient then deleting tiles, because
in case of valid tiles, they won't get downloaded.

Fixes #4376.
2019-05-21 01:04:01 +03:00
Thiago Marcos P. Santos
06f1dc48a2 [core] Make the BackgroundScheduler a singleton
- Do not carry it over everywhere as parameter, it is a shared
  instance anyway and the lifecycle is pretty much the app lifecycle
  from the moment we instantiate a map.
- Rename to BackgroundScheduler because it is a Scheduler that will
  do tasks in the background, we don't make assumptions if it is a
  thread pool or a single thread.
- Most importantly, remove the dependency from `core` on `platform`.
2019-05-10 14:20:38 +03:00