Commit Graph

1517 Commits

Author SHA1 Message Date
Maksim Skurydzin
c7737fe877 [test] Add unit tests for mbgl::util::Timer covering timer cancellation at/after its expiration (#15621) 2019-09-19 19:55:00 +03:00
Mikhail Pozdnyakov
224d49cc90 [core] Check layer compatibility with source 2019-09-18 16:21:59 +03:00
Juha Alanen
6b13c42314 [build] Fix clang format and tidy checks 2019-09-18 14:29:15 +03:00
Juha Alanen
97c4f13bec [tests] Add feature state unit test 2019-09-18 14:29:15 +03:00
Juha Alanen
1b639d0819 [tests] Update expression unit test for feature state 2019-09-18 14:29:15 +03:00
Juha Alanen
599fa581f4 [tests] Update bucket unit test for feature state 2019-09-18 14:29:15 +03:00
Thiago Marcos P. Santos
a849b38390 [build] Mark explicitly visible symbols
Easier to maintain than a linker script. We build
everything with visibility hidden by default.
2019-09-17 12:28:55 +03:00
Thiago Marcos P. Santos
79670593de [build] Make test/util.hpp a public interface
We will build the tests as a library and platforms will
provide the test runner.
2019-09-17 12:28:55 +03:00
Mikhail Pozdnyakov
6899337f86 [core] Add Map.Issue15342 unit test
The newly added test checks the fix for constant repaint,
caused by `RenderSource::hasFadingTiles()` returning `true` all the time.
2019-09-12 00:40:08 +03:00
Mikhail Pozdnyakov
8af78ddbb9 [core] Update MapObserver::onDidFinishRenderingFrame() API 2019-09-12 00:40:08 +03:00
Bruno de Oliveira Abinader
788508984f [test] Added style light setProperty tests 2019-09-11 14:29:26 +03:00
Alexander Shalamov
92b3386dec [core] Add unit test to verify that Offline usage tag is not set
New unit test checks that Offline usage flag is not set for invalidated
offline region resource requests.
2019-09-11 10:47:55 +03:00
Mikhail Pozdnyakov
151ea331f8 [core] Use mapbox::base::TypeWrapper instead of utils::peer 2019-09-10 11:51:17 +03:00
Konstantin Käfer
c7be3d52a7 Always call onSourceLoaded observers (#15548)
* [core] add sources to source collection before triggering load

* [test] add testcase for #15514

* [core] also call onSourceLoaded observers when no network request was necessary
2019-09-03 17:02:23 -07:00
Mikhail Pozdnyakov
3b5a43c722 [core] Enable text-offset with variable label placement
Port of https://github.com/mapbox/mapbox-gl-js/pull/8642
2019-09-03 11:45:17 +03:00
Aleksandar Stojiljkovic
4ba1270dcc [core] DEMData: do decode on GPU (port mapbox/mapbox-gl-js#8694)
This is first part of work on porting mapbox/mapbox-gl-js#8694 - in follow up patch(es) it is required to remove CPU side copy using 2d canvas support on all supported platforms, similar to approach taken in gl.js  https://github.com/mapbox/mapbox-gl-js/pull/8694/files#diff-34dbe5f7de34dc4b9a8745dcde9bdc37R48

Decoding on CPU removed.
Padding is still done in DEMData() but, instead od doing it wwhile decoding, it is using memcpy to pad original values.

Rebase to latest mapbox-gl-js master and re-generate shaders.

Partly fixes: #15503
2019-08-30 11:18:55 +03:00
zmiao
6ef2710e5c [core] fix collisionBox alignment when Icon/text translation is enabled (#15467)
* add initial fix

* fix bug for collision circle

* refind code structure

* fix indentation

* update test

* refind code structure

* Add changelog

* Add comment for boolean
2019-08-30 08:24:03 +03:00
Bruno de Oliveira Abinader
544aabd020 [core] Add requiredTileCount to OfflineRegionStatus 2019-08-29 18:22:59 +03:00
Mikhail Pozdnyakov
f84e46ad26 [core] Mark offline region resources in batches 2019-08-29 17:28:51 +03:00
Alexander Shalamov
9e3cb67d1c [core][qt] Update unit tests and include Korean symbols
- Decrease pixelmatch tolerance for local glyph rasterizer
- Add Korean symbols to test fixture
- Fix ifdefs, as the QT and Apple related blocks were using same results
- Add NotoSansCJK test for QT / Linux platform
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
zmiao
c770c23262 [core] fix mixed sdf + non-sdf icon rendering in one layer (#15456)
* [core] fix icon symbol rendring when sdf and non-sdf icon in the same symbol layer

* fix build error

* fix typo

* revert renderableSegment change

* simplify codes

* fix build error

* refine sdf icon flag

* [core] fix mixed sdf + non-sdf icon rendering in one layer

* remove iconstatus getter in stymbol bucket

* fix review findings

* provide bitwise operator for SymbolContent enum

* use MBGL_MBGL_CONSTEXPR

* add one missing update for sdfIcon

* make renderer symbol type as enum
2019-08-26 21:54:59 +03:00
Aleksandar Stojiljkovic
9eff849c74 [core] Fix tileCover / TileCoordinate fromScreenCoordinate(#15442)
Remove unecessary tile coordinate unproject -> project  step.
Unproject+project isn't always a noop and this was the issue leading to wrong cover calculation in high pitch values.

Fixes: https://github.com/mapbox/mapbox-gl-native/issues/15442
2019-08-23 16:43:05 +03:00
Mikhail Pozdnyakov
ef3d04dee5 [core] Export symbol placement update status from MapObserver 2019-08-23 10:56:05 +03:00
Asheem Mamoowala
aebcaf685f Add unit test and fixture 2019-08-21 12:00:26 +03:00
Asheem Mamoowala
0c017c3e49 Correclty implement canRasterizeGlyph in unit test stub 2019-08-21 12:00:26 +03:00
Alexander Shalamov
9ba700fd47 [core] Fix combination of icon-text-fit with text-variable-anchors and text-writing-mode 2019-08-20 12:31:02 +03:00
Konstantin Käfer
71a334152a [core] also remove version info in ImageManager when removing an image (#15397) 2019-08-19 13:54:30 -07:00
Dane Springmeyer
1165f62df6 [core][test] fix leaks from sqlite usage 2019-08-16 15:51:42 +03:00
zmiao
0f34eb7b25 Indroduce clusterProperty option for aggregation (#15287)
* indroduce clusterProperty option for aggregation

* remove unnecessary codes

* update geojson_option conversion

* fix reviewing findings
2019-08-16 15:03:48 +03:00
Alexander Shalamov
5f477e310b [core] Check type of a convertible value when constructing legacy filter 2019-08-16 00:19:30 +03:00
Alexander Shalamov
f0f1d7130f [core] Update shaping unit test 2019-08-13 13:32:56 +03:00
Alexander Shalamov
e9ca844d66 [core] Update unit tests 2019-08-13 13:32:56 +03:00
Jason Wray
5722136680 [core] Disable flaky OfflineDatabase.MaximumAmbientCacheSize test 2019-08-07 10:42:35 -07:00
Mikhail Pozdnyakov
187962e425 [core] Fix render tile set source update
Before this change, the `RenderTileSetSource` implementation
ignored update calls for the sources whose description was not yet
loaded and it lead to missing of relayout requests.
2019-08-01 18:20:21 +03:00
Aleksandar Stojiljkovic
73d9f26d03 [core] Limit pitch based on edge insets. Fix max Z calculation in getProjMatrix.
Patch partly fixes #15163 in a way that it doesn't allow loading tens of thousands of tiles and attempt to show area above horizon:

Limit pitch based on edge insets. It is not too bad - current limit of 60 degrees stays active until center of perspective is moved towards the bottom, to 84% of screen height. The plan is to split removal of 60 degrees limit to follow up patch.

Fix max Z calculation in getProjMatrix. TransformState::getProjMatrix calculation of farZ was complex with possibility to lead to negative z values. Replacing it with simpler, precise calculation:
furthestDistance = cameraToCenterDistance / (1 - tanFovAboveCenter * std::tan(getPitch()));

TransformState::getProjMatrix calculation of farZ was an aproximation. Replacing it with simpler, but precise calculation.

Related to: #15163
2019-08-01 09:28:36 +03:00
Alexander Shalamov
05af3e0e28 [core] Add unit test for grid index 2019-07-30 14:46:18 +03:00
Mikhail Pozdnyakov
be5aa1806b [core] Added unit test for issue 15216 2019-07-26 11:23:13 +03:00
Mikhail Pozdnyakov
273ad436fb [core] Avoid copying feature properties 2019-07-25 17:36:35 +03:00
Mikhail Pozdnyakov
2c2e8589c3 [core] GeometryCollection must not be implicitly copied 2019-07-24 21:04:56 +03:00
Alexander Shalamov
852fef66ef [core] Force getGeometries() return const ref 2019-07-24 21:04:56 +03:00
Alexander Shalamov
b4056ad88f [core] Update CrossTileSymbolLayerIndex unit test 2019-07-23 15:43:27 +03:00
Mikhail Pozdnyakov
11bfe23981 [core] Symbol bucket uses shared layout
sizeof(SymbolBucket): 2296 -> 1024
2019-07-22 12:23:39 +03:00
Mikhail Pozdnyakov
63dd17e2bb [core] Introduce TileRenderData
Remove rendering functionality from Tile implementations.
2019-07-04 16:56:43 +03:00
Thiago Marcos P. Santos
657e847015 [tests] Update test expecations 2019-06-28 15:19:58 +03:00
Thiago Marcos P. Santos
848ad0d25e [core] include Hiragana and Katakana glyph ranges to LocalGlyphRasterizer
Fixes #14993
2019-06-28 15:19:58 +03:00
Juha Alanen
0ca8ea6f16 [core] Add number-format expression 2019-06-27 15:51:22 +03:00
Thiago Marcos P. Santos
24df7fe5f5 [core] Add storage unit tests for MapboxTileLimitExceeded 2019-06-19 17:19:10 +03:00
Thiago Marcos P. Santos
1977934bdb [tests] Add unit tests for cache size 2019-06-18 16:26:51 +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