Commit Graph

11 Commits

Author SHA1 Message Date
tobrun
99f9787cc4 [core] - add LatLng for screencoordinate to mapsnapshotter 2018-07-05 18:50:21 +02:00
Anand Thakker
cfd436c287 [core] Avoid blocking in Thread<Object> constructor (#12151)
* Introduce AspiringActor, EstablishedActor

This pair of objects represents the two-phase (parent-thread /
child-thread) construction that's needed to support constructing
Thread<Object> without blocking until the child thread is up and
running.

An `AspiringActor<O>` is responsible for:
 - ownership of the actor's `Mailbox`
 - allocating the memory for (but *not* constructing) the target object `O`

Using these two pieces--the mailbox and a stable address for `O`--an
`AspiringActor<O>` can accept messages for the target object, or provide
`ActorRef<O>`s that do so, before the object has actually been
constructed by the corresponding `EstablishedActor<O>`.  (Such messages
are queued in the mailbox until after the object is constructed.)

This allows for an `AspiringActor<O>` to be created and safely used by a
thread other than the one on which the target object will (eventually)
live.

An `EstablishedActor<O>` is responsible for managing the lifetime of the
target object `O` and the open/closed state of the parent's `mailbox`.

The `O` object's lifetime is contained by that of its owning
`EstablishedActor<O>`: the `EstablishedActor` constructor executes the
`O` constructor via "placement new", constructing it at the address
provided by the parent `AspiringActor`, and the `~EstablishedActor`
destructor similarly executes the `~O` destructor (after closing the
mailbox). `EstablishedActor` should therefore live entirely on the
thread intended to own `O`.

* Remove Actor#{invoke,ask}
2018-07-03 17:17:39 -04:00
tobrun
930d0bc17c [core] [android] - optional map snapshotter camera position 2018-05-31 07:23:06 +02:00
tobrun
7193a43729 [core] [android] - add style json setter/getter to map snapshotter 2018-05-30 20:23:57 +02:00
Tobrun
671fe37b1e Style JSON configuration on map snapshotter (#11976)
* [core, android, darwin] - add style JSON configuration on MapSnapshotter
2018-05-23 10:52:22 +02:00
Ansis Brammanis
22c07596a0 [core] Split MapMode::Still into Static and Tile
`Tile` makes sure the symbols in the resulting tile are tileable while
symbols in `Still` match rendering in `Continuous` mode.
2017-11-17 10:05:15 -08:00
Ivo van Dongen
2c0c516354 [core] map snapshotter - add attributions to snapshotter callback 2017-10-31 19:52:08 +02:00
Ivo van Dongen
87b735aaf7 [default] map snapshotter - add function to get screen coordinate from latlng for snapshot
- Wraps the TransformState for the snapshot so that the snapshotter itself is free to be re-used or destroyed
2017-10-31 19:52:08 +02:00
Ivo van Dongen
7481d317e7 [android] map snapshotter - add mutators 2017-10-31 19:52:08 +02:00
Ivo van Dongen
d37144d2f8 [core] map snapshotter - add mutators 2017-10-31 19:52:08 +02:00
Ivo van Dongen
fae9faab06 [default] map snapshotter 2017-08-30 17:18:37 +03:00