Commit Graph

467 Commits

Author SHA1 Message Date
Thiago Marcos P. Santos
5254876b39 [build] Remove Qt builds from legacy buildsystem 2019-09-17 12:28:55 +03:00
Thiago Marcos P. Santos
3cc026dc16 [build] Remove Qt test dependency on core
This test is testing the Qt bindings and should only
link with QMapboxGL.
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
8ee6cfa8fb [build] Cosmetics on vendor packages
- Add include guards on all the files
- Add a vendor package for sqlite and gtest
- Use relative paths to all the files
2019-09-17 12:28:55 +03:00
Mikhail Pozdnyakov
8af78ddbb9 [core] Update MapObserver::onDidFinishRenderingFrame() API 2019-09-12 00:40:08 +03:00
Alexander Shalamov
5d316a8076 [core][qt] Check if QFont supports glyph and adjust backing image width
- Don't rasterize glyphs if font does not support requested code point
- Render symbols at hardcoded baseline, so that locally rasterized glyphs
  align better with server side generated fonts.
- Resize backing QImage width to be at least 24px
2019-08-28 12:08:54 +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
Mikhail Pozdnyakov
ef3d04dee5 [core] Export symbol placement update status from MapObserver 2019-08-23 10:56:05 +03:00
Juha Alanen
0ca8ea6f16 [core] Add number-format expression 2019-06-27 15:51:22 +03: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
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
Konstantin Käfer
8f331f5ae3 [core] refactor ThreadLocal backend 2019-04-08 14:41:16 +02:00
Konstantin Käfer
5cc3d7a733 [core] move GLContextMode to RendererBackend 2019-04-05 11:49:17 +02:00
Konstantin Käfer
66c020034e [core] refactor RendererBackend 2019-04-05 11:49:17 +02:00
Konstantin Käfer
a782a6d15b [core] move BackendScope to gfx namespace 2019-04-05 11:49:17 +02:00
Sudarsana Babu Nagineni
7af00a404f [core] Include pixelRatio property in MapOptions
Move pixelRatio property from Map constructor to MapOptions.
2019-03-28 16:41:15 +02:00
Sudarsana Babu Nagineni
1cc1d4ea08 [core] Add setter/getter for size property in MapOptions 2019-03-28 16:41:15 +02:00
Sudarsana Babu Nagineni
11afef7825 [core] Add interface to change the orientation through MapOptions 2019-03-28 16:41:15 +02:00
Bruno de Oliveira Abinader
ac6855a473 [core] Fix signature of fluent interface setters 2019-03-23 09:12:44 +02:00
Bruno de Oliveira Abinader
d5868d3da8 [core] Remove file source from public Map ctor 2019-03-20 21:30:08 +02:00
Ander Conselvan de Oliveira
5733440747 [core] Group Map LatLngBounds, min and max zoom methods
Group bounds, minimum and maximum zoom related methods together using
the new BoundOptions.

v2: Document that getBounds() initializes all optional fields.
  - Add test for getBounds() on a map with default values.
2019-03-14 18:33:11 +02:00
Bruno de Oliveira Abinader
8cc100bfd5 [core] Get FileSource via UpdateParameters in Renderer::Impl 2019-03-13 17:56:44 +02:00
Ander Conselvan de Oliveira
7d19115720 [core] Don't use exceptions in MapObserver::onDidFailLoadingMap
Using different exception pointers to specify the loading failure makes
an awkward API. Most users rethrow the exception only to figure out what
type of error happened so it can be reported properly. So replace the
exception pointer with a enum an string description of the failure.
2019-03-13 11:58:27 +02:00
Thiago Marcos P. Santos
7cdc39bee9 [Qt] Fix race when locking a FileSource
We were returning the FileSource, it could have expired
already. We _need_ to check if the lock() on the weak
pointer worked before returning.
2019-03-08 20:56:45 +02:00
Sudarsana Babu Nagineni
5e2b6bf636 [core] Add MapOptions to define properties of Map
To simplify the Map constructor, introduce MapOptions
interface to define the properties that can be set on
a Map.
2019-03-08 18:20:55 +02:00
Thiago Marcos P. Santos
7b7ad9d39b [qt] Also use the base API URL as key for sharing the cache.
Otherwise we will have a URL pointing to different servers and
potentially different data.
2019-03-04 19:33:45 +02:00
Bruno de Oliveira Abinader
586b22c0df [core] Remove map coordinate setters/getters 2019-03-04 14:45:32 +02:00
Bruno de Oliveira Abinader
ba7427b4ac [core] Transform{State}: s/angle/bearing/ 2019-03-04 14:45:32 +02:00
Bruno de Oliveira Abinader
73ac3c784f [core] Remove map bearing setters/getters 2019-03-04 14:45:32 +02:00
Bruno de Oliveira Abinader
21a39306da [core] Remove map pitch setters/getters 2019-03-04 14:45:32 +02:00
Bruno de Oliveira Abinader
f5f10ec119 [core] Remove map zoom setters/getters 2019-03-04 14:45:32 +02:00
Bruno de Oliveira Abinader
491fce6879 [core] Added Map::pitchBy() 2019-03-04 14:45:32 +02:00
Bruno de Oliveira Abinader
02f2b9c75c [core] Added Map::scaleBy() 2019-03-04 14:45:32 +02:00
Bruno de Oliveira Abinader
362231e2d0 [qt] Cleanup QMapboxGL::coordinateZoomForBounds() 2019-03-04 14:45:32 +02:00
Thiago Marcos P. Santos
edc6a5dd8b [qt] Share the same file source only if using the same access token
If access tokens are different, we cannot share the file source,
because it will override the previously set access token.
2019-02-27 13:31:21 +02:00
xylosper
0c66ce9a95 [qt] fix missing alpha channel for QColor
`QColor::name()` produces `#rrggbb` format where alpha is missing.
Use `rgba(...)` string instead when convert `QColor` to mapbox style.

Note: `QColor::name(QColor::HexArgb)` produces `#aarrggbb` format string,
but mapbox does not support this format apparently.
2019-02-20 16:16:34 +02:00
Thiago Marcos P. Santos
056073a904 [build] Use the correct define on Windows
https://blog.kowalczyk.info/article/j/guide-to-predefined-macros-in-c-compilers-gcc-clang-msvc-etc..html
2019-02-19 16:20:56 +02:00
Thiago Marcos P. Santos
65cec8be34 [android,darwin,ios,qt] Remove unused code
These files are no longer needed after the new GL abstraction.
2019-02-12 19:42:08 +02:00
Thiago Marcos P. Santos
690833ef92 [core] Switch to the new OpenGL abstraction
This patch will make Mapbox GL Core never use OpenGL
directly. We should consider locking into OpenGL ES 2.0
to simplify the code path and remove #ifdefs.
2019-02-12 19:42:08 +02:00
Thiago Marcos P. Santos
470b01847d [android,linux,darwin,qt] Load OpenGL for the platform
These loaders will provide pointers to the platform implementation
of OpenGL. On Android, Linux and Darwin, we simply link with the
OpenGL implementation that is expected to exist on the platform.

Qt has its own GL loader, so we just connect the dots.
2019-02-12 19:42:08 +02:00
xylosper
fbbc83aa0e [qt] fix missing Q_MAPBOXGL_EXPORTs
New projection-related functions in QMapbox namespace
are missing Q_MAPBOXGL_EXPORTs.
2019-02-12 11:08:26 +02:00
xylosper
26af7265c3 [qt] add global projection functions
There are 3 methods in QMapboxGL which can be static method.

QMapboxGL::metersPerPixelAtLatitude
QMapboxGL::projectedMetersForCoordinate
QMapboxGL::coordinateForProjectedMeters

Add these functions into QMapbox namespace as global functions.
The methods in QMapboxGL are kept for backward compatibility.
2019-02-12 11:08:26 +02:00
xylosper
b1ee903dc4 [qt] Add example of feature collection data for GeoJSON source
The example shows that both of QList<QMapbox::Feature> and
QVector<QMapbox::Feature> can be used as feature collection data
for GeoJSON layer.
2019-02-01 16:34:35 +02:00
xylosper
6b2f17191b [qt] Support feature collection for GeoJSON source data
This commit adds support of `QVector<QMapbox::Feature>`
and `QList<QMapbox::Feature>` for data in GeoJSON source.
2019-02-01 16:34:35 +02:00
Thiago Marcos P. Santos
2a535a8f5e [qt] Use QVector instead of QList
For our use case `QVector` is more efficient and will
do less memory allocations.

Fixes: #13830
2019-01-30 16:22:13 +02:00
Bruno de Oliveira Abinader
963dd5e567 [Qt] Support local font family in QMapboxGLSettings 2019-01-04 17:27:41 -04:00
Bruno de Oliveira Abinader
513b50eee8 [Qt] Implement LocalGlyphRasterizer 2019-01-04 17:27:41 -04:00
Konstantin Käfer
1d8235f5b8 [build] rework platform/default directory and add -files.txt for vendored libs 2018-12-14 11:03:03 +01:00
Huyen Chau Nguyen
9a606caf0b [core] define number of concurrent downloads in online file source variable 2018-11-15 12:19:48 -08:00