summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* [core] Handle zero text sizeMikhail Pozdnyakov2019-12-191-1/+1
| | | | | | | | The style specification stipulates that `text-size` values must be positive (https://docs.mapbox.com/mapbox-gl-js/style-spec/#layout-symbol-text-size). However, a zero value could be passed to the engine (e.g. as a result of an expression) this patch handles it and avoids assertion hit in `shaping.cpp`.
* Revert "[core] Remove Map::cycleDebugOptions"tobrun2019-12-191-0/+24
| | | | This reverts commit 1e2cd1e086c3053f1cea075d7641b7f56cc7dfbf.
* [core] Fix really overscaled lines #16018Ansis Brammanis2019-12-181-6/+7
|
* [core] Add unit test for calculateTileDistancesAlexander Shalamov2019-12-182-4/+5
|
* [core] Add unit test for getAnchors and remove unused fieldAlexander Shalamov2019-12-182-7/+6
|
* [core] Don't use signed int type for anchor segmentAlexander Shalamov2019-12-187-40/+75
|
* [core] Refactoring transform state (#15956)zmiao2019-12-057-193/+522
| | | | | | | | | | * [core] Refactoring transform state class * [core] update matrix in transform, Fix precision * [core] Make matrix mutable so that we only update them when needed * [core] Add getters for matrices
* [core] Remove Map::cycleDebugOptionsBruno de Oliveira Abinader2019-12-041-24/+0
|
* [core] Merge style::Layer::set{Layout,Paint}PropertyMikhail Pozdnyakov2019-12-0312-827/+536
|
* [core] Turn off clang format for generated shaded codeAlexander Shalamov2019-12-021-3/+2
|
* [core] Add unit tests for Formatted classAlexander Shalamov2019-12-021-3/+2
|
* [core] Shape images in labels at bucket zoom levelAlexander Shalamov2019-12-023-1/+5
|
* [core] Use linear filtering for icons in text for zoom dependent text-sizeAlexander Shalamov2019-12-021-7/+9
|
* [core] Use new 'SymbolTextAndIcon' program to draw icons in textAlexander Shalamov2019-12-0241-634/+1124
|
* [core] Store 'sdf' flag in vertex attributeAlexander Shalamov2019-12-026-41/+48
|
* [core] Shape images in labels and create image quadsAlexander Shalamov2019-12-0212-215/+368
|
* [core] Calculate line width and line breaks for imagesAlexander Shalamov2019-12-022-23/+34
|
* [core] Pass images and evaluated layout text size to shapingAlexander Shalamov2019-12-024-19/+58
|
* [core] Add evaluated images to styled text sectionsAlexander Shalamov2019-12-023-21/+73
|
* [core] Add image sections to format expressionAlexander Shalamov2019-12-025-71/+122
|
* [core] Introduce Pass<> class and use it for SchedulerMikhail Pozdnyakov2019-12-021-4/+4
| | | | Thus we enforce client to retain the returned `Scheduler` objects.
* [core] Blacklist VAO extension for Adreno (TM) 4xx GPUsAlexander Shalamov2019-12-021-8/+8
| | | | Blacklist in order to avoid crashes in a driver.
* [core] Retain thread pool in GeoJSONSourceMikhail Pozdnyakov2019-11-291-2/+2
| | | | Otherwise, the construction of the `Immutable<Source::Impl>` in background thread might never yeld.
* [core] GeoJSONVTData uses Scheduler::GetSequenced()Mikhail Pozdnyakov2019-11-291-14/+19
|
* [core] Introduce GeometryTile::reset()Mikhail Pozdnyakov2019-11-296-17/+44
| | | | | | The newly introduced `GeometryTile::reset()` is used while GeoJSON tile update in order to prevent from the parsing of the new data with the stale layers or vice verse.
* [core] Calculate GeoJSON tile geometries in a background threadMikhail Pozdnyakov2019-11-294-38/+46
| | | | | Call `mapbox::geojsonvt::GeoJSONVT::getTile()` in a background thread, so that the rendering thread is not blocked.
* [core] Fix supercluster lambdas capturingMikhail Pozdnyakov2019-11-291-7/+7
|
* [core][android][darwin] Fix GeoJSONOptions handlingMikhail Pozdnyakov2019-11-294-27/+31
| | | | | | - share the `GeoJSONOptions` instances using `Immutable<GeoJSONOptions>` - avoid extra copying - fix wrapping of the `GeoJSONOptions` instances in supercluster map/reduce lambdas. Previously, local variables were wrapped by reference.
* [core] Introduce Scheduler::GetSequenced() APIMikhail Pozdnyakov2019-11-281-0/+27
| | | | | | The newly introduced `Scheduler::GetSequenced()` returns sequenced schedulers from the cache limited to 10 instances, preventing from spawning too many threads.
* [core] Clear tiles when GeoJSON data changesMikhail Pozdnyakov2019-11-261-15/+13
| | | | | In tile and static mode clear tiles when data changes in order to avoid render tests being flaky.
* [core] fix rendering of dashed lines with round capsKonstantin Käfer2019-11-221-2/+20
| | | | | | | | | | | | | In https://github.com/mapbox/mapbox-gl-native/pull/15862, we introduced individual textures for line dash patterns to eliminate atlas overflows. Unfortunately, this broke dashed lines that had round caps (dashed lines with straight caps still rendered correctly). Line pattern textures for round caps were now using 256×15 pixel textures. The OpenGL ES 2.0 spec, section 3.8.2 states: Calling a sampler from a fragment shader will return `(R,G,B,A) = (0,0,0,1)` if any of the following conditions are true: […] - A two-dimensional sampler is called, the corresponding texture image is a non-power-of-two image […], and either the texture wrap mode is not `CLAMP_TO_EDGE`, or the minification filter is neither `NEAREST` nor `LINEAR`. […] This means that texture lookups won't work for NPOT textures unless they use `GL_CLAMP_TO_EDGE`. We're using `GL_CLAMP_TO_EDGE` for the vertical direction, but GL_REPEAT for the horizontal direction, which means that we need a power-of-two texture for our line dash patterns to work on OpenGL ES 2.0 conforming implementations. Fortunately, this just means changing the height from 15 to 16, and from 30 to 32, so we don't waste many pixels.
* [core] Remove default move operator for RenderTileRoman Kuznetsov2019-11-191-1/+0
|
* [core] Fix incorrect resizing of TileCacheSergey Yershov2019-11-191-2/+2
|
* [core] Introduce style::CollectionWithPersistentOrderMikhail Pozdnyakov2019-11-193-39/+77
| | | | | | So that we do not unnecessarily remove and re-add sources and images if their order has been modified in the updated style.
* [core] Fix MapSnapshotter build failure on WindowsAnder Conselvan de Oliveira2019-11-132-8/+4
| | | | | | | | 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.
* [core] Avoid GeoJSON source flickering on style transitionsMikhail Pozdnyakov2019-11-121-12/+13
| | | | | | | | | | | | Before this change, all GeoJSON source cleared tile pyramid at the style transition and it caused flickering. Now, in Continuous mode, we keep the existing tiles until the new GeoJSON data is not yet available, thus providing smart style transitions without flickering. In other modes (Static, Tile) clear the tile pyramid in order to avoid render tests being flaky.
* [core] Implement image expression (#15877)Alexander Shalamov2019-11-1154-418/+724
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [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
* [core] Add batch conversion of latLngs to/from screenCoords (#15891)zmiao2019-11-071-0/+18
| | | | | | * [core] Add batch conversion of latLng vs screenCoord * [core] Take the simple approach
* [core] Parse GeoJSONSource description in backgroundMikhail Pozdnyakov2019-11-051-12/+24
| | | | Unblocks the UI thread on heavy GeoJSON tiles parsing operation
* [core] Add Scheduler::scheduleAndReplyValue() APIMikhail Pozdnyakov2019-11-051-2/+2
|
* [android] Convert GeoJSON features to tiles in backgroundMikhail Pozdnyakov2019-10-311-0/+4
| | | | | | | | | Composing tiles from the GeoJSON features is an expensive operation that might block UI thread on updating the `GeoJsonSource` with the new data. This change moves tile composing to the background thread and thus unblocks the UI thread.
* [core] Introduce and apply GeoJSONData::create() APIMikhail Pozdnyakov2019-10-313-40/+33
|
* [render-test] Add resource usage tracking to gfx contextMikko Pulkki2019-10-3013-14/+148
|
* [core] use individual textures for line dash patternsupstream/zmiao-testKonstantin Käfer2019-10-294-102/+141
| | | | | | | | 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.
* [ios][android][core] Added change log entries and more code commentsMikhail Pozdnyakov2019-10-281-0/+3
|
* [core] Do not make pending requests for already requested images.Mikhail Pozdnyakov2019-10-281-9/+6
| | | | | so that processing for the corresponding tile does not suspend and the rendering performance is not affected.
* Revert "[core] Revert coalescing requests to the client for the same missing ↵Mikhail Pozdnyakov2019-10-282-31/+56
| | | | | | image" This reverts commit 22132683797b5ea5cbe8622f77c01b399ad9c71e.
* [core] Fixed formattingMikhail Pozdnyakov2019-10-241-8/+5
|
* [core] Revert coalescing requests to the client for the same missing imageMikhail Pozdnyakov2019-10-242-56/+34
|
* [core] avoid edges for labels that use text-variable-anchorsAnsis Brammanis2019-10-241-4/+4
| | | | to prevent clipped labels in rendered image tiles.