Commit Graph

39 Commits

Author SHA1 Message Date
Thiago Marcos P. Santos
cf95bc2bb2 [build] Disable clang-format on generated code
Nice to have, but would make maintain the templates a lot harder.
2019-09-25 18:59:07 +03:00
Mikhail Pozdnyakov
30e659beed [core] Fix formatting 2019-09-18 16:21:59 +03:00
Mikhail Pozdnyakov
152d4c35fc [core] Add LayerTypeInfo::TileKind 2019-09-18 16:21:59 +03:00
Bruno de Oliveira Abinader
6fdf07e3a7 [core] Use mbgl::underlying_type in style properties 2019-09-11 14:29:26 +03:00
Mikhail Pozdnyakov
f2ad89c463 [core] Remove RenderLayerSymbolInterface 2019-05-19 18:15:33 +03:00
Mikhail Pozdnyakov
cb73f0dd1c [core] Remove clipping option from RenderTile and style::Layer 2019-05-08 15:18:33 +03:00
Konstantin Käfer
2489afdd0d [build] change style code generator to sort properties alphabetically
JSON keys in our style specification don't have a defined order. This change sorts them alphabetically so that we can rely on the order remaining them same across code generation runs.
2019-05-02 17:44:18 +02:00
Mikhail Pozdnyakov
a0c83808c0 [core] Add FadingTiles layer type property 2019-04-17 17:21:41 +03:00
Konstantin Käfer
3ceabcd3ec [core] clang-tidy fixes 2019-04-05 11:49:17 +02:00
Mikhail Pozdnyakov
d4d12fb8a5 [core] Use eternal::hash_map in style::Layers 2018-12-19 19:09:19 +02:00
Mikhail Pozdnyakov
ebd87a5442 [core, android, darwin] Move layer factories to separate files 2018-12-10 18:20:32 +02:00
Mikhail Pozdnyakov
361982fef8 [core][Android][Darwin] LayerManager creates RenderLayer instances
`LayerManager` is now responsible for `RenderLayer` instances creation,
so that there is a single entry point for creating of objects, which
correspond to a certain layer type.

The `LayerType type` field is dropped from `Layer::Impl`.
2018-11-27 18:10:21 +02:00
Alexander Shalamov
527851e2aa [core] Add static layer properties to mbgl::style::LayerTypeInfo 2018-11-19 14:06:21 +02:00
Mikhail Pozdnyakov
33818233cf [core][android] Introduce mbgl::style::LayerTypeInfo
The `LayerTypeInfo` contains static meta data about certain layer type.

Each layer module should have a single immutable `LayerTypeInfo` instance
for the represented layer type. Both `LayerImpl` and `LayerFactory` from the
module always refer to the same `LayerTypeInfo` instance, so address of this
instance can be used as a layer module Id during the process life time.
2018-11-15 18:32:31 +02:00
Mikhail Pozdnyakov
5a70f2b150 noexcept specifier for layer factory methods 2018-11-07 16:34:20 +02:00
Mikhail Pozdnyakov
ffdeef3a26 Refer corresponding LayerFactory instance from the Layer::Impl 2018-11-07 16:34:20 +02:00
Mikhail Pozdnyakov
cfcb53128b Introduce the style::Layer factory classes
This patch introduces the initial implementation of
- A `LayerFactory` abstract class that creates `style::Layer` instances of
  a certain layer type (line, hillshade, round, ..)
- A singleton `LayerManager` class, which is responsible for initializing
  the `LayerFactory` instances and forwarding the `create()` calls to the
  corresponding factory.
2018-10-31 18:05:01 +02:00
Mikhail Pozdnyakov
7a9461a8d4 Consolidate style::Layer properties API
The `style::Layer` class now exposes all the properties contained at `style::LayerImpl`.
This allowed to drop `style::Layer::accept()` method usage, avoid the repeated generated code
and thus save some binary size.

This patch is a part of the layers modularization effort.
2018-10-25 22:42:43 +03:00
Konstantin Käfer
112bbc7ab2 [core] make style/conversion.hpp implementation private 2018-08-19 13:09:16 +02:00
John Firebaugh
d886d3e4c0 [core] Factor out setVisibility conversion 2018-08-13 12:39:44 -07:00
John Firebaugh
58202eaf80 [core] Optimize generated set{Paint,Layout}Property code 2018-08-13 12:39:44 -07:00
John Firebaugh
b2f60a4bf2 [core] Eliminate setProperty & co. 2018-08-13 12:39:44 -07:00
Łukasz Paczos
22b4ef1f4b Update layer immediately when changing its max/min zoom level (#11399)
* [android][core] update layer immediately when changing it's max/min zoom

* [core] node bindings for layer zoom range
2018-04-12 10:42:14 +02:00
John Firebaugh
1cf46d93b9 [core] Simplify LayerObserver API 2017-06-05 19:38:08 -07:00
John Firebaugh
9eba2a66d1 [core, node, darwin, qt] Remove support for paint classes 2017-05-15 09:45:55 -07:00
John Firebaugh
e473f2dcce [core] cascade ⇢ transition / cascading ⇢ transitionable 2017-05-15 09:45:55 -07:00
John Firebaugh
da4d735e2c [core] Unify {Paint,Layout,Light}Properties 2017-05-15 09:45:55 -07:00
John Firebaugh
2690a65f8d [core] *LayerImpl::cascading ⇢ paint 2017-05-15 09:45:55 -07:00
John Firebaugh
c2a5894f2d [core] Immutable Impls 2017-05-12 11:26:27 -07:00
Ivo van Dongen
3c175adf30 [core] split off render layers 2017-04-25 17:23:54 -07:00
Fabian Guerra Soto
20712b7c84 Per-attribute transition properties on MGLStyleLayer (#8225)
* [ios, macos] new struct MGLTransition

* [ios] MGLTransition struct moved to MGLTypes.h

* [ios] MGLTransition implemented for style layer properties

* [ios, macos] added support for getting property transitions

* [ios, macos] updated to MGLDurationFromTimeInterval and MGLTimeIntervalFromDuration

* [ios, macos] added transition properties test

* [ios, macos] modified key strings imp

* [ios, macos] The impl for transition properties were changed to public methods

* [ios, macos] Changelog update

* [ios] Fixed layer space formatting

* [core] The name space was fixed for getters that returned TransitionOptions

* [ios, macos] Added rawLayer transition property tests

* [ios] Added a factory method for MGLTransition and transition-related methods to NSValue(MGLAdditions)

* [ios, macos] Copyedited changelog blurbs about transition properties
2017-03-10 11:33:31 -08:00
John Firebaugh
b6e5edc268 [core] Restore support for *-transition properties 2017-02-09 15:08:51 -06:00
John Firebaugh
0c0064c050 [core] Get rid of user-specified refs 2017-01-04 17:38:33 -08:00
John Firebaugh
38fcbe21d4 [core] Convert style properties to a tuple-based approach
This converts the style property classes (CirclePaintProperties and so on) to the same tuple-based approach as gl::Attribute and gl::Uniform. The approach is outlined in https://github.com/mapbox/cpp/blob/master/C%2B%2B%20Structural%20Metaprogramming.md.

The main advantage of this approach is it allows writing algorithms that work on sets of style properties, without resorting to code generation or manually repetitive code. This lets us iterate on approaches to data-driven properties more easily.

Another advantage is that the cascading, unevaluated, and evaluated states of a set of properties exist as independent structures, instead of individual properties holding their own state. This is a more functional approach that makes data flow clearer and reduces state.
2016-11-17 15:13:38 -08:00
John Firebaugh
fe2a26225f [core, ios, android, qt] Observe style layer mutations rather than requiring SDKs to use Map::update
This paves the way for updates to filter and layout properties to trigger a source reload, without each SDK having to participate in the implementation.
2016-09-06 14:29:22 -07:00
John Firebaugh
3a48c60813 [core] Add missing classed paint property getter 2016-09-06 12:52:14 -07:00
John Firebaugh
63cce78cf1 [core] Add static getters for property default values (#6124) 2016-08-23 12:49:47 -07:00
John Firebaugh
16c435b151 [core, node] Implement bindings for addLayer 2016-06-24 09:39:51 -07:00
John Firebaugh
c902f9098b [core] Rationalize naming for style-related code 2016-06-02 14:51:39 -07:00