Commit Graph

4014 Commits

Author SHA1 Message Date
Thiago Marcos P. Santos
2125080dc3 [core] Change severity of too many data-driven properties to "Info"
So it can be filtered by the SDKs using a Log::Observer.
2019-06-15 03:39:45 +03:00
Mikhail Pozdnyakov
2acfa8b86f [core] Keep the same sort index for all feature rings 2019-06-12 20:39:03 +03:00
Konstantin Käfer
ce91218b42 [core] don't call glFlush on every frame 2019-06-12 18:08:18 +02:00
Konstantin Käfer
844299f1c3 [build] remove roundtrip through <experimental/optional> when using optional 2019-06-12 12:04:07 +02:00
Aleksandar Stojiljkovic
d7fa18efa6 [core] Remove unused OffscreenTexture variant with depth render target 2019-06-11 11:39:51 +03:00
Vladimir Agafonkin
6262b83cc6 [core] Switch back to a more compact line attributes layout (#14851)
* [core] switch back to a more compact line attributes layout

* update mapbox-gl-js to point to master
2019-06-10 22:26:16 +03:00
Mikhail Pozdnyakov
6583204e69 [core] TilePyramind uses TransformState::getScale() 2019-06-10 19:36:47 +03:00
Mikhail Pozdnyakov
1edebf0035 [core] TilePyramid::getRenderTiles -> getRenderedTiles 2019-06-10 19:36:47 +03:00
Mikhail Pozdnyakov
737665bc07 [core] Refactor tile pyramid
Tile pyramid is no longer operating with `RenderTiles` and does not perform
rendering operations (upload, finish render).

Render tiles belong to rendering, and tile pyramid belongs to orchestration.
2019-06-10 19:36:47 +03:00
Mikhail Pozdnyakov
ad53132e5d [core] Inherit RenderAnnotationSource from RenderTileSource 2019-06-10 19:36:47 +03:00
Thiago Marcos P. Santos
50e239a937 [core] Renamed to avoid collision with libcurl
Rename curlx_sltosi to mbgl_curlx_sltosi to avoid collision
when liking with libcurl statically.
2019-06-10 15:34:38 +03:00
Aleksandar Stojiljkovic
0bab9127d7 [core] Use unique ID in hillshade and hillshade_prepare draw. 2019-06-06 11:21:37 +03:00
Juha Alanen
f9796d2a28 [core] Fix symbol rendering under opaque fill layers 2019-06-04 16:35:53 +03:00
Mikhail Pozdnyakov
76d8fd0a79 [core] Update comments for pattern atlas 2019-06-04 15:28:00 +03:00
Mikhail Pozdnyakov
a9abc43510 [core] Introduce PatternAtlas 2019-06-04 15:28:00 +03:00
Mikhail Pozdnyakov
c0e5632001 [core] Remove ImageManager from upload parameters 2019-06-04 15:28:00 +03:00
Konstantin Käfer
892699a39a [core] fix warnings with Xcode 11's updated Clang version 2019-06-04 10:07:19 +02:00
Mikhail Pozdnyakov
b242883587 [core] Use fresh transform state for bucket vertices update in placement
The transform state cached in placement might get stale and cannot be used for bucket vertices updates.
2019-06-03 17:03:57 +03:00
Mikhail Pozdnyakov
a44b7f1e5d [core] Avoid unneeded update of symbol dynamic vertex buffer 2019-06-03 17:03:57 +03:00
Aleksandar Stojiljkovic
62f6338d5b [core] Fix: fill-extrusion-vertical-gradient was ignored. #14784
fill-extrusion-vertical-gradient "property-type": "data-constant" and it shouldn't be computed through property binders.

Fixes: #14784
2019-05-31 18:40:27 +03:00
Mikhail Pozdnyakov
b50aa497cc [core] Introduce RenderTileSource
RenderTileSource is a base class for the render sources that provide render tiles.

* Removes repeated code
* Simplifies render source code refactoring and improves readability
2019-05-29 12:04:26 +03:00
Konstantin Käfer
81667ae4e9 [core] end the RenderPass/CommandEncoder before sending events 2019-05-28 16:11:05 +02:00
Konstantin Käfer
12d8948c2a [core] ensure gfx::DrawScopes are unique 2019-05-28 16:11:05 +02:00
Konstantin Käfer
7f9274035b [core] refactor program object creation 2019-05-28 16:11:05 +02:00
Thiago Marcos P. Santos
33ee7e23de [core] Remove priority from the constructor
Make the constructor less verbose and set good defaults.
2019-05-28 16:30:49 +03:00
Mikhail Pozdnyakov
2f97a2660a [core] RenderTile returns textures by const reference 2019-05-28 16:16:42 +03:00
Mikhail Pozdnyakov
43966f1611 [core] Placement::placeLayerBucket() -> placeBucket() 2019-05-28 16:16:42 +03:00
Mikhail Pozdnyakov
054645042a [core] Encapsulate symbol bucket placement code in Placement::placeLayerBucket() 2019-05-28 16:16:42 +03:00
Mikhail Pozdnyakov
a03f7b166b [core] RenderTile does not expose Tile
RenderTile and Tile will be split when ochestration movces to a separate thread.

This PR improves encapsulation of Tiles management: now performed within TilePyramid.
2019-05-28 16:16:42 +03:00
Aleksandar Stojiljkovic
9809c9f8f5 [core] Offset viewport center when edge insets are specified
The change is implemented in TransformState::getProjMatrix, the rest of the code is making sure that existing API contracts stay and there are tests verifyingrendering and render query processing only items within screen and given tolerance around screen edges.

MapView: don't bake edge insets into relalculated camera center. Keep edge insets as property of camera in TransformState (similar to pitch, zoom, bearing) independent from specified camera center. Interpolate edge insets in animation.

iOS Demo app: "Turn On/Off Content Insets" pitch the camera and navigate to convenient location in Denver, where streets are parallel to cardinal directions, to illustrate viewport center offset when edge insets are set.

Tests:
ViewFrustumCulling: although Annotations are deprecated, queryRenderedFeatures related tests in Annotations would need to get ported and decided to add the edge insets related query tests next to them. Verify frustum culling (render+queryRenderedFeatures) With different camera and edge insets setups. TODO: port Annotations tests.

Transform.Padding: Verify that coordinates take proper place on screen after applying edge insets.

LocalGlyphRasterizer: verify text rendering when applying padding.

Related to #11882: both use projection matrix elements [8] and [9].

Alternative approach to this was to increase and offset map origin so that the screen would be a sub-rectangle in larger map viewport. This approach has a drawback of unecessary processing the items that are outside screen area.

Fixes #12107, #12728, navigation-sdks/issues/120
2019-05-28 14:38:01 +03:00
Aleksandar Stojiljkovic
788d54b2b4 FillBucket::triangles could be empty: skip creating buffer and draw. (#14761) 2019-05-24 17:46:57 +03:00
Alexander Shalamov
0333f3fe44 [core] Prefer breaking lines at zero width space (ZWSP) 2019-05-24 05:59:07 -07:00
Mikhail Pozdnyakov
aa3a7cf02f [core] SymbolBucket updates complete at placement stage
`RenderSymbolLayer` does not have to update dynamic vertices of its buckets, this logic is moved to placement (which is already updates opacity vertices).

* fixes clustering of labels when text variable placement enabled - as assignes `usesVariablePlacement` per bucket
* simplifies the code in `RenderSymbolLayer` (the `RenderSymbolLayer::upload()`	is now omitted).
* symbol buckets are not modified after orchestration finishes
2019-05-24 10:54:06 +03:00
Łukasz Paczos
37d9dfae69 [core] round color string's alpha to 2 decimal places 2019-05-22 16:32:04 +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
Mikhail Pozdnyakov
e79080771b [core] RenderLayer::render(PaintParameters, RenderSource*) -> render(PaintParameters) 2019-05-22 16:41:10 +03:00
Mikhail Pozdnyakov
25093370e2 [core] RenderLayer::setRenderTiles(RenderTiles) -> prepare(LayerPrepareParameters)
RenderLayer::prepare() is responsible for the complete initialization of a render
layer, so that it can render.
2019-05-22 16:41:10 +03:00
Mikhail Pozdnyakov
84d3b5f899 [core] Prepare render sources before render layers are initialized 2019-05-22 16:41:10 +03:00
Alexander Shalamov
100eb61fa4 [core] Forward ImageManagerObserver::onRemoveUnusedStyleImages to MapObserver interface 2019-05-21 06:49:17 -07:00
Alexander Shalamov
d24524440c [core] Add onRemoveUnusedStyleImages observer API 2019-05-21 06:49:17 -07:00
Thiago Marcos P. Santos
c2f974f2a5 [core] Remove binary shader support
The implementation is buggy and not worth maintaining anymore
because performance benefits are not substantial or sometimes
worse. Also, removing it saves about 150 ~ 180 KB in binary size.

Below timings are averages of minimum 5 runs.

```
Device          Init launch     Average relaunch
s10             1129.8 ms       700 ms
s10 - binary    1346.75 ms      694 ms
Pixel           1692 ms         723 ms
Pixel - binary  1883 ms         1039 ms
Kazam           17948 ms        1339 ms
Kazam - binary  19157 ms        1564 ms
Wiko            2060 ms         1278 ms
Wiko - binary   3876 ms         1136 ms
```

Fixes #14294
2019-05-21 15:05:37 +03:00
Ander Conselvan de Oliveira
f210bbbb6c [core] Don't use optional unique_ptr in function coversion code
Since unique_ptr is already nullable there is no need to wrap it in an
optional<>.
2019-05-21 12:14:22 +03:00
Ander Conselvan de Oliveira
e30ff619c6 [core] Forward args in style::expression::dsl::compound() 2019-05-21 12:14:22 +03:00
Ander Conselvan de Oliveira
d502b72449 [core] Pass legacy/categorical/*-default expression tests
Handle categorical function default value properly in conversion to
expreexpression so related tests pass.
2019-05-21 12:14:22 +03:00
Ander Conselvan de Oliveira
1e620d3bd8 [core] Fix legacy/{interval,exponential}/*-default expression tests
Consider the function default value in interval and exponential
functions conversion.
2019-05-21 12:14:22 +03:00
Ander Conselvan de Oliveira
f2f2e64fc8 [core] Expose dsl::compound() internally
This will be used in a follow up patch by the function to expression
conversion code.
2019-05-21 12:14:22 +03:00
Ander Conselvan de Oliveira
343df18954 [core] Fix some of the legacy interval function expression tests
The tests for conversion of legacy interval functions to expressions
expects that the first stop in the "step" expression be omitted.
2019-05-21 12:14:22 +03:00
Ander Conselvan de Oliveira
33cfd080c2 [core] Fix most identity function with default legacy expression tests
Add handling of default value to the conversion of legacy identity
functions. The color and enum tests still don't pass though.
2019-05-21 12:14:22 +03:00
Ander Conselvan de Oliveira
11055f9a88 [core] Fix indentation of src/mbgl/style/conversion/function.cpp
One line in that file was indented with tabs instead of spaces.
2019-05-21 12:14:22 +03:00
Aleksandar Stojiljkovic
2a3a1c7bb3 [core] Remove re-linking programs approach (#14482)
Remove re-linking programs as redundant.
It costs (cheaper to link once than twice) and (subjective) is not that common GL API
usage pattern, although perfectly legal and permitted.
Initial idea, behind the removed code, was to enable work on optimization
that would reduce number of attrib setup calls in case when VAO is not
available (as described in #9433).

As such optimization is not implemented, and it is arguable if it makes sense
to do it now, we can remove re-linking.

Related to closed PRs #9433 and PR #11583.

I have [measured the time spent just on relinking](https://gist.github.com/astojilj/29bd5a5c5dc0b2d9f29ecb660da07fbf) using release build on iPhone SE (A9, same as iPhone 6S):

- 1st run after reboot or installation
Total 37.14ms, average per program:1.86ms

- reopening
Total: 2.47ms, average per program: 0.12ms

This time we save using the patch here.
2019-05-20 16:17:19 +03:00