Commit Graph

1547 Commits

Author SHA1 Message Date
Mikhail Pozdnyakov
9f24115d13 [core] Identation and build fixes 2019-11-19 15:03:28 +02:00
Sergey Yershov
37b332899b [core] Fix incorrect resizing of TileCache 2019-11-19 15:03:28 +02:00
Mikhail Pozdnyakov
15e1d35488 [core] Add Style.SourceImplsOrder test 2019-11-19 14:39:52 +02:00
Ander Conselvan de Oliveira
4c1d03c257 [core] Fix MapSnapshotter build failure on Windows
MSVC implementation of std::promise is buggy and only works with types
that can be default-constructed. To avoid a compilation failure in the
instantiation of ask() inside MapSnapshotter::getRegion(), which creates
a std::promise<LanLngBounds>, make LatLngBounds' default constructor
public.
2019-11-13 13:31:01 +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
Mikhail Pozdnyakov
ee38730eed [core] Add Source.GeoJSONSourceTilesRemainAfterDataReset unit test 2019-11-12 15:12:31 +02:00
Alexander Shalamov
c6f3cc8b60 [core] Implement image expression (#15877)
* [core] Bump gl-js version
* [core] Implement image expression
* [core] Use new image expression
* [core] Coerce image expression to / from string
* [core] Serialize evaluated image
* [core] Pass available images to layout
* [core] Pass images to evaluation context
* [core] Set available flag value based on image availability
* [core] Allow image coercion to boolean to indicate image availability
* [core] Coalesce image expression
* [core] Add image expression to next build system
* [core] Align serialization format and evaluated type with gl-js
* [core] Add images to expression evaluation method
* [core] Add support for Image expression to expression test runner
* [core] Unskip image expression tests
* [core] Update unit tests
* [core] Use image expression in annotation manager
* [core] Add string to ImageExpression conversion
* [core] Add image expression to expression dsl
* [core] Convert tokens for implicitly created Image literal
* [core] Fix clang format
* [core] Split generated style code lines that are over 120 characters
* [core] Add unit test for image expression equality
* [core] Add image property expression evaluation unit test
* [core] Unskip image expression render test
* [core] Skip 'in' expression tests
* [core] Ignore fill-pattern/update-feature-state render test
* [core] Rename Image::serialize to Image::toValue
2019-11-11 18:20:01 +02:00
zmiao
2e8a350d68 [core] Add batch conversion of latLngs to/from screenCoords (#15891)
* [core] Add batch conversion of latLng vs screenCoord

* [core] Take the simple approach
2019-11-07 18:16:31 +02:00
Mikhail Pozdnyakov
31421f8448 [core] Add Scheduler::scheduleAndReplyValue() API 2019-11-05 11:45:38 +02:00
Mikko Pulkki
a7a7e8cbe2 [render-test] Implement gfx probe for tracking gpu resources 2019-10-30 14:32:27 +02:00
Konstantin Käfer
84f2ff1084 [core] use individual textures for line dash patterns
This moves the LineAtlas from a shared texture that contained SDF dash patterns to use individual textures.

Previously, the texture space was limited to a texture of 512 pixels height. Dash patterns were never removed (and are still never removed as of this patch), which means that this texture could fill up for styles that use a lot of different dash patterns. In particular, dash patterns for lines with a round line cap take up 15 pixels of texture height, limiting the amount of unique dash patterns to 34. While this was probably enough for rendering a single style, we quickly exhausted this number when reusing the Map object to render different styles.

Instead of a global shared texture, we're now creating individual textures for every dash pattern. These textures are still cached so that we don't need to re-upload the texture on every frame.
2019-10-29 11:27:24 +01:00
Mikhail Pozdnyakov
f1a28377b5 [core] Add Map.NoHangOnMissingImage unit test 2019-10-28 13:02:32 +02:00
Mikhail Pozdnyakov
2f00ba7294 [core] Do not make pending requests for already requested images.
so that processing for the corresponding tile does not suspend and
the rendering performance is not affected.
2019-10-28 13:02:32 +02:00
Mikhail Pozdnyakov
aa36dc87fb Revert "[core] Revert coalescing requests to the client for the same missing image"
This reverts commit 22132683797b5ea5cbe8622f77c01b399ad9c71e.
2019-10-28 13:02:32 +02:00
Mikhail Pozdnyakov
424cf20207 [core] Revert coalescing requests to the client for the same missing image 2019-10-24 15:43:13 +03: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
Mikhail Pozdnyakov
3ac706edfe [core] Update ImageManager.OnStyleImageMissingBeforeSpriteLoaded
So that it checks pending image requests for a different requestor.
2019-10-17 16:29:02 +03:00
Konstantin Käfer
2187980a87 [core] fix icon-text-fit
This fixes rendering by account for the 1px texture padding around icons that were stretched with icon-text-fit. We've added the 1px padding before, but didn't scale it accordingly when we are resizing the icon when it is stretched to fit the text. Adjusts the code to match the logic in GL JS.
2019-10-14 18:46:12 +02:00
Mikhail Pozdnyakov
ef8540b683 [core] Update ImageManager.OnStyleImageMissingBeforeSpriteLoaded unit test
So that it checks missing images requests coalescing.
2019-10-10 15:39:34 +03:00
Mikhail Pozdnyakov
f62e5b00c9 [core] Introduce Scheduler::makeWeakPtr() 2019-10-09 23:46:11 +03:00
Mikhail Pozdnyakov
bef635765a [core] Decouple Scheduler interface from actor model
So that it is possible to schedule normal `std::function` and use `mapbox::base::WeakPtr`.
2019-10-04 17:42:21 +03:00
Mikhail Pozdnyakov
ff6a3ee5b7 [core] Suppress network requests for invisible tiles
If the render source does not need rendering, we set necessity for its tiles to `optional`, and thus suppress network requests on tiles expiration.
2019-10-02 20:45:46 +03:00
Mikhail Pozdnyakov
d446b3382b [core] Enable move semantics for StyleProperty 2019-09-27 19:17:25 +03:00
Ander Conselvan de Oliveira
bb9b1ab624 [core] Return enum layer property values as string
The output of Layer::getProperty is a mapbox::base::Value which is
equivalent to JSON. When setting the value of an enum property via JSON
its value would be a string, so it would be natural to return a string
too.

Also, the numbers generated depend on the enum definition. They are not
part of the style spec.
2019-09-27 17:09:45 +03:00
Mikhail Pozdnyakov
5304bbc438 [core] Layer::getProperty supports layout properties 2019-09-27 13:08:53 +03:00
Mikhail Pozdnyakov
34ab7be225 [core] Layer::getPaintProperty() -> Layer::getProperty() 2019-09-26 15:54:03 +03:00
Mikhail Pozdnyakov
e78c31c4b5 [core] LayerProperty -> StyleProperty 2019-09-26 11:57:39 +03:00
Mikhail Pozdnyakov
b5862c2127 [core] Add Map.UniversalStyleGetter test 2019-09-26 11:57:39 +03:00
Thiago Marcos P. Santos
c7bbd5bbef [core] Fix performance-move-const-arg 2019-09-25 18:59:07 +03:00
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