summaryrefslogtreecommitdiff
path: root/src/mbgl/util
Commit message (Collapse)AuthorAgeFilesLines
* [core] Fix modernize-return-braced-init-list errors in header filesThiago Marcos P. Santos2020-04-171-1/+1
| | | | As reported by clang-tidy-8.
* [core] Fix readability-avoid-const-params-in-decls errors in header filesThiago Marcos P. Santos2020-04-171-5/+4
| | | | As reported by clang-tidy-8.
* [build] Fix undefined behavour sanitizer (#16375)zmiao2020-04-072-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [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
* Refactor tileCover to support lod tilesMikko Pulkki2020-04-065-19/+482
|
* [core] Move logging off the main threadJuha Alanen2020-04-011-6/+47
|
* [core] Fix readability-* errorsThiago Marcos P. Santos2020-03-3012-125/+185
| | | | As reported by clang-tidy-8.
* [core] Fix bugprone-macro-parentheses errorsThiago Marcos P. Santos2020-03-301-4/+2
| | | | As reported by clang-tidy-8.
* [core] Fix google-readability-casting errorsThiago Marcos P. Santos2020-03-301-4/+6
| | | | As reported by clang-tidy-8.
* [core] Fix within meridian issuezmiao2020-03-261-1/+5
|
* [core] Fix performance-unnecessary-value-param errorsThiago Marcos P. Santos2020-03-232-2/+2
| | | | As reported by clang-tidy-8.
* [core] Fix performance-inefficient-vector-operation errorsThiago Marcos P. Santos2020-03-231-0/+1
| | | | As reported by clang-tidy-8.
* Refactor within functionzmiao2020-03-191-3/+0
|
* [core] Using TileCoordinates for geometry comparisonzmiao2020-03-192-80/+32
|
* [core] Fix within expression serialization + fix within expression equal ↵zmiao2020-03-051-0/+4
| | | | operator
* [core] Fix within case when point is on polygon boundaryzmiao2020-03-051-0/+9
|
* [core] Fix Color serializationAlexander Shalamov2020-02-261-0/+11
|
* [core] Add bounding box overlapping check before line within polygon testzmiao2020-02-212-0/+88
|
* [core] Remove unnecessary includes, fix commentszmiao2020-02-211-1/+0
| | | | This reverts commit b5c386ad7708ca9fe14f219b0ffc94cf6ce8fc88.
* [core] Update unti tests. Remove unnecessary debugging codezmiao2020-02-212-76/+32
|
* [core] Move geometry within algorithm to utilzmiao2020-02-212-0/+162
|
* [core] Store SegmentVectors in ephemeral render objectsKonstantin Käfer2020-02-142-25/+0
| | | | | | | We used some shared SegmentVectors, e.g. for drawing raster or background tiles. In longer running maps, this lead to resource accumulation. By storing the SegmentVectors and the contained gfx::DrawScope objects, we ensure that resources get released when the associated render objects vanish.
* [core] Add hooks for setting experimental thread priorities for mbgl threadsAlexander Shalamov2020-02-062-2/+28
|
* [core] Fix GeoJSONVTData ownership and life cycleMikhail Pozdnyakov2020-01-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Before this change, the `GeoJSONVTData` instance was retained at the scheduled lambda, which run on the worker thread represented by the `GeoJSONVTData::scheduler` class member: ``` std::weak_ptr<GeoJSONVTData> weak = shared_from_this(); scheduler->scheduleAndReplyValue( [id, weak, this]() -> TileFeatures { if (auto self = weak.lock()) { return impl.getTile(id.z, id.x, id.y).features; } return {}; }, fn); ``` It caused program termination in case `self` turned to be the last reference to `this`, as the `std::thread` destructor was called from the thread it represented. Now, only the `GeoJSONVTData::impl` class member is retained.
* [core] Refactoring transform state (#15956)zmiao2019-12-052-2/+2
| | | | | | | | | | * [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] Add Scheduler::scheduleAndReplyValue() APIMikhail Pozdnyakov2019-11-051-2/+2
|
* [core] Introduce Scheduler::makeWeakPtr()Mikhail Pozdnyakov2019-10-091-0/+3
|
* [core] Introduce SequencedScheduler and ParallelSchedulerMikhail Pozdnyakov2019-10-072-42/+73
| | | | | | | | | | | This commit refactors `utils::ThreadPool` into a template `ThreadedScheduler` class and provides aux type aliases. So that it is possible to obtain a sequenced schedule,where all the scheduled tasks are guarantied to be executed consequently. The sequenced lightweight scheduler is required by both the orchestration thread and the refactored `FileSource` implementation.
* [core] Decouple Scheduler interface from actor modelMikhail Pozdnyakov2019-10-042-7/+6
| | | | So that it is possible to schedule normal `std::function` and use `mapbox::base::WeakPtr`.
* [core] Introduce Layer::getPaintProperty() generic getterMikhail Pozdnyakov2019-09-261-4/+1
|
* [core] type aliases and conversion traits for mapbox::base::ValueMikhail Pozdnyakov2019-09-261-4/+4
|
* [build] Move compression to platformThiago Marcos P. Santos2019-09-201-104/+0
| | | | It depends on platform specific compression library.
* [core] Fix compilation failure caused by compilation warning for gcc 8Ming Li2019-09-121-2/+7
| | | | | | | When compiling with gcc 8.3 under linux, I've got compiler error caused by the following warning: ../src/mbgl/util/chrono.cpp:26:26: error: ‘__builtin___snprintf_chk’ output may be truncated before the last format character [-Werror=format-truncation=] I need to slightly increase the buffer size to get rid of the warning.
* [core] Fix tileCover / TileCoordinate fromScreenCoordinate(#15442)Aleksandar Stojiljkovic2019-08-233-13/+14
| | | | | | | 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
* [core][node] Serialize formatted expression's text-color optionAlexander Shalamov2019-08-151-0/+7
| | | | This enables proper round-tripping for serialized format expression.
* [core] Render half-width glyphs in upright orientationAlexander Shalamov2019-08-132-0/+10
| | | | | | | | | | This change forces glyphs whose natural orientation in vertical writing mode is 'sideways' to be rendered in upright orientation (only for non complex text layouts). This is different compared to W3C / browser behavior that is by default, renders glyphs in their respective natural orientation. In the future, there might need to add a new layout property that would control glyph orientation separately (e.g., text-glyph-orientation: natural | upright).
* [core] Use constexpr map for verticalized punctiationAlexander Shalamov2019-08-131-2/+4
|
* [core] Fix int overflow issue in GridIndexAlexander Shalamov2019-07-302-16/+18
|
* [core] include Hiragana and Katakana glyph ranges to LocalGlyphRasterizerThiago Marcos P. Santos2019-06-281-1/+2
| | | | Fixes #14993
* [core] round color string's alpha to 2 decimal placesŁukasz Paczos2019-05-221-1/+1
|
* [core] option to perform platform specific operations when ↵Łukasz Paczos2019-05-221-0/+3
| | | | creating/destroying core threads
* [core] use unique IDs for DrawScopesKonstantin Käfer2019-05-153-1/+30
|
* [core] Make the BackgroundScheduler a singletonThiago Marcos P. Santos2019-05-102-0/+86
| | | | | | | | | | - Do not carry it over everywhere as parameter, it is a shared instance anyway and the lifecycle is pretty much the app lifecycle from the moment we instantiate a map. - Rename to BackgroundScheduler because it is a Scheduler that will do tasks in the background, we don't make assumptions if it is a thread pool or a single thread. - Most importantly, remove the dependency from `core` on `platform`.
* [core] change approach to stencil clipping to (almost) match JSKonstantin Käfer2019-04-292-45/+0
|
* [core] Updated script detection for Unicode 12.1Minh Nguyễn2019-04-171-2/+13
| | | | Updated script detection files to reflect changes in Unicode 12.1.
* [core] refactor ThreadLocal backendKonstantin Käfer2019-04-081-13/+25
|
* [core] clang-tidy fixesKonstantin Käfer2019-04-053-6/+4
|
* [core] add gfx::Renderable and gfx::OffscreenTextureKonstantin Käfer2019-04-052-139/+0
|
* [core] prefer static_cast for casts to derived classesKonstantin Käfer2019-04-051-2/+2
|
* [core] add generic base class for renderbuffersKonstantin Käfer2019-04-052-6/+5
|
* [core] gl::RenderbufferType -> gfx::RenderbufferPixelTypeKonstantin Käfer2019-04-052-4/+4
|