summaryrefslogtreecommitdiff
path: root/src/mbgl/geometry
Commit message (Collapse)AuthorAgeFilesLines
* [core] Distance expression: Change template class into template function in ↵zmiao2020-04-221-3/+3
| | | | | | geometry_util, add range assertion for distance contaniner IndexRange Change distance units to small letters, update tests accordingly
* Introduce a mean to add render features in layers with no sourcesGali Nelle2020-04-172-1/+67
| | | | | | This change also uses the support in the LocationIndicator layer, to return a point feature when queried in correspondence of the location indicator.
* [core] Fix modernize-pass-by-value errors in header filesThiago Marcos P. Santos2020-04-171-2/+2
| | | | As reported by clang-tidy-8.
* [core] Fix readability-avoid-const-params-in-decls errors in header filesThiago Marcos P. Santos2020-04-172-15/+24
| | | | As reported by clang-tidy-8.
* [build] Fix undefined behavour sanitizer (#16375)zmiao2020-04-071-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [build] Fix integer overflow runtime error for core part Temporarily remove circle ci UBSAN build precondition * [build] Enable all of the ubsans [build] Check runtime error [build] Update UBSAN_OPTION * [build] Add UBSAN blacklist [build] Ignore system libraries [build] Ignore vendor library * [build] Fix implicit conversion runtime error in core * [build] Fix division by zero runtime error * [build] Add unfixed error to ubsan blacklist * [build] Make UBSAN halt on error Revert "Temporary remove build precondition" * [build] Fix division by zero error * [build] Make UBSAN officially work without FIXME prefix * [build] Fix implicit conversion from int64_t to uint64_t * [build] Rename style test json file name * Address review findings
* [core] Fix modernize-return-braced-init-list errorsThiago Marcos P. Santos2020-03-231-1/+1
| | | | As reported by clang-tidy-8.
* [core] Add RenderOrchestrator::clearData()Mikhail Pozdnyakov2020-03-181-0/+2
|
* [core] Fix iterators in addRegularDash()Mikhail Pozdnyakov2020-02-281-10/+14
| | | | Fix using of invalid iterators.
* Port line-dasharray fix from gl-jsKarim Naaji2020-02-142-59/+126
| | | | | | | | | | | | | | | | * Fix artifact for zero-lenghted dash array Fixes issue https://github.com/mapbox/mapbox-gl-js/issues/9213 and add render test for coverage around 0-length dash arrays Update distance field generation for regular dashes as follows: 1. Compute the dash array ranges and stretch location along the distance field 2. Collapse any 0-length distance field range 3. Collapse neighbouring same-type parts into single part * combine consecutive dashes and parts https://github.com/mapbox/mapbox-gl-js/pull/9246 https://github.com/mapbox/mapbox-gl-native/issues/16181
* [core] Add unit test for getAnchors and remove unused fieldAlexander Shalamov2019-12-091-3/+2
|
* [core] Don't use signed int type for anchor segmentAlexander Shalamov2019-12-091-2/+3
|
* [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] use individual textures for line dash patternsupstream/zmiao-testKonstantin Käfer2019-10-292-68/+110
| | | | | | | | 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.
* [core] Clang format fixandroid-v8.3.2Mikhail Pozdnyakov2019-09-192-12/+12
|
* [core] Fix Placement constnessMikhail Pozdnyakov2019-09-192-2/+4
| | | | Update buckets methods do not mutate placement, placement methods do not mutate buckets.
* [build] Fix clang format and tidy checksJuha Alanen2019-09-182-59/+38
|
* [core] Feature state support to RenderLayer classesJuha Alanen2019-09-181-1/+1
|
* [core] Add feature state support to queryRenderedFeatures APIJuha Alanen2019-09-182-7/+24
|
* [core] DEMData: do decode on GPU (port mapbox/mapbox-gl-js#8694)Aleksandar Stojiljkovic2019-08-302-51/+47
| | | | | | | | | | | 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
* [core] Force getGeometries() return const refAlexander Shalamov2019-07-241-1/+1
|
* [core] Improve performance for query rendered featuresAlexander Shalamov2019-07-092-17/+10
| | | | | - query rendered symbols only from layers that support it - remove unnecessary iterations over vectors
* [core] Keep the same sort index for all feature ringsMikhail Pozdnyakov2019-06-121-1/+1
|
* [core] Remove RenderLayerSymbolInterfaceMikhail Pozdnyakov2019-05-191-1/+2
|
* [core] add gfx::UploadPass, split startRender into prepare and uploadKonstantin Käfer2019-05-152-9/+11
|
* [core] add getResource template to gfx::*Resource classesKonstantin Käfer2019-04-051-1/+1
|
* [core] add texture bindings to draw call instead of Context member fnKonstantin Käfer2019-03-122-9/+9
|
* [core] use abstract Context interface where possibleKonstantin Käfer2019-03-122-9/+8
|
* [core] move Texture to the gfx namespaceKonstantin Käfer2019-03-122-6/+6
|
* [core] move Texture related enums to gfx namespaceKonstantin Käfer2019-03-121-2/+2
|
* remove unused dem memoryMolly Lloyd2019-03-052-22/+15
|
* [core] fix deduping rings in querying, #11357Ansis Brammanis2019-01-041-1/+2
|
* [core] Replace RenderSymbolLayer downcast with symbol interfaceAlexander Shalamov2018-11-191-1/+1
|
* [core] remove some uses of <iostream> and <sstream>Konstantin Käfer2018-10-231-1/+0
|
* [core] don't use <boost/functional/hash.hpp> to avoid <locale> includeKonstantin Käfer2018-10-231-3/+2
|
* [core] Port "collision group" plumbing to gl-native.Chris Loer2018-09-121-1/+4
| | | | | [node] Hook up map-wide "crossSourceCollisions" option, defaulting to true. [test] Pass "crossSourceCollisions" test option through test harness; enable cross-source-collisions tests on native.
* [core] Fix sort order for queryRenderedFeatures when features are filtered.Chris Loer2018-07-031-5/+6
| | | | Fixes issue #12104.
* [core] fix undefined behavior in LineAtlas::addDashKonstantin Käfer2018-06-121-0/+7
|
* Merge branch 'release-boba' into masterupstream/fabian-merge-release-4.0.1-masterFabian Guerra2018-05-171-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # mapbox-gl-js # platform/android/CHANGELOG.md # platform/android/MapboxGLAndroidSDK/gradle.properties # platform/android/gradle/dependencies.gradle # platform/darwin/src/MGLVectorTileSource.mm # platform/darwin/src/MGLVectorTileSource_Private.h # platform/ios/CHANGELOG.md # src/mbgl/style/expression/compound_expression.cpp
| * [core] Convert "legacy" filters directly into expressions (#11610)Lucas Wojciechowski2018-05-101-1/+0
| | | | | | Ports the specialized filter-* expressions from GL JS, adding them to src/mbgl/style/expression/compound_expression.cpp
* | [core] Only run placement for first layer per SymbolBucketChris Loer2018-05-032-10/+10
| | | | | | | | | | | | | | | | | | Native version of mapbox/mapbox-gl-js#6548. Port of mapbox/mapbox-gl-js#6550. Prevents symbols that share the same layout properties from colliding against each other. Bump GL JS pin to get regression test. Rename "bucketName" -> "bucketLeaderID" to make it clearer what it represents.
* | [core] only index features within tile boundariesAnsis Brammanis2018-04-261-3/+9
| | | | | | | | | | | | | | Previously we relied on tile buffers for querying features who's rendered representations cross tile boundaries. Now we query multiple tiles making it unnecessary to index features that are completely outside a tile's boundaries.
* | [core] fix circle querying for scale and alignmentChris Loer2018-04-262-9/+15
| | | | | | | | | | | | | | This fixes circle querying for cases where either circle-pitch-alignment=map or circle-pitch-scaling=viewport
* | [core] fix querying circles across tile boundariesChris Loer2018-04-262-5/+5
| |
* | Port global symbol query from GL JS:Chris Loer2018-04-252-32/+58
|/ | | | | | | - Symbol querying is now global instead of per-tile - Symbols that bleed over tile boundaries no longer missed in queries - Symbol results now sorted based on rendering order (ie overlapping symbols change their sort order when a bearing change causes their render order to change) - Placement::retainedQueryData now responsible for maintaining symbol querying data for buckets that may no longer be in the TilePyramid.
* [core] Make FeatureIndex own GeometryTileData.Chris Loer2018-04-022-10/+14
| | | | | Prevents querying a FeatureIndex built against a separate set of data, which can lead to invalid index exceptions. The GeometryTileWorker 'data' member can still change independently of the data in the feature index, at the time 'setData' is called. The GeometryTileWorker maintains ownership of its local data (which may be used to re-parse) and clones the data for use by the FeatureIndex in the foreground.
* [core] Add expression filter support (#11251)Lucas Wojciechowski2018-03-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * WIP * WIP * WIP * Remove Filter::operator()(const Feature&) * WIP * WIP * WIP * WIP * Hook up expression filter evaluator * Replace `shared_ptr` with &reference * Fill in implementation of `void operator()(const ExpressionFilter&)` * Fix failing tests * Switch back to a shared_ptr per chat with @anandthakker * Fix benchmark compilation * Shot in the dark to fix CI * Shot in the dark to fix CI (part 2) * Shot in the dark to fix CI (part 3) * In src/mbgl/style/conversion/filter.cpp, add a port of isExpressionFilter and use it to decide in Converter<Filter>::operator() whether to parse the incoming JSON as an ExpressionFilter or one of the legacy filter types * Remove bool Filter::operator()(const GeometryTileFeature&) const * Ensure the map zoom is passed into filtering operations wherever applicable * Add expression filter tests * Addressed PR feedback * Implement `NSPredicate *operator()(mbgl::style::ExpressionFilter filter)` * Fix formatting& nit
* [core] add support for mapzen terrarium (#11154)Molly Lloyd2018-02-142-3/+16
| | | | | | | | | | | | * add support for mapzen terrarium * Encoding --> DEMEncoding, avoid if statement when unpacking elevation values * add Terrarium test * update submodule * remove redundant checks
* [core] add raster-dem source type and hillshade layer type (#10642)Molly Lloyd2018-01-232-0/+142
|
* [core] Cleanup in response to review comments.Chris Loer2017-11-171-10/+4
|
* [core] Cleanup in response to review commentsChris Loer2017-11-171-1/+1
|