Commit Graph

18 Commits

Author SHA1 Message Date
John Firebaugh
41bbd4e4f7 [core] Use an actor model for tile worker concurrency 2016-09-16 12:01:06 -07:00
John Firebaugh
c8217a8739 [core] Extract SymbolLayout from SymbolBucket
SymbolLayout lives on the worker thread and contains the persistent data needed for repeated placement. SymbolBucket contains the data generated during placement, and is transferred to the main thread for rendering.

This eliminates the risky sharing of GeometryTile::buckets between the main thread and worker thread during TileWorker::redoPlacement.

While here, rationalize the names of states a SymbolLayout may be in:

* Pending: Waiting for the necessary glyphs or icons to be available.
* Prepared: The potential positions of text and icons have been determined.
* Placed: The final positions have been determined, taking into account prior layers.

In TileWorker, all SymbolLayouts are stored in a single vector. Each SymbolLayout knows what state it is in, and TileWorker can easily determine how much progress it can make toward a final result.
2016-09-14 13:41:56 -07:00
Konstantin Käfer
426242fe41 [core] change bool to enum class bool TileLoadState 2016-09-07 17:56:38 +02:00
John Firebaugh
3635b9f147 [core] Prepare style observer interfaces for source reloading
* Renamed {Source,Tile}Observer::onNeedsRepaint to onTileUpdated. Messages should be in terms of what happened to the observed object, not in terms of what the observer needs to do. This also removes a confusing overlap of virtual methods on StyleObserver.
* Added style::Observer::onUpdate(Update). This is also a violation of the above rule, but I'm hopeful that it will disappear when update batching is implemented.
2016-09-06 12:52:14 -07:00
John Firebaugh
5b4f6335e3 [core] Add Source::Impl::reload 2016-09-06 12:52:14 -07:00
John Firebaugh
21dc12ee93 [core] Ensure that TileWorker can retain tileData after layout 2016-09-06 12:52:13 -07:00
John Firebaugh
7c801696eb [core] const consistency 2016-08-26 10:30:55 -07:00
John Firebaugh
e2f52a1dd8 [core] Copy only the necessary style layers to the worker 2016-06-17 11:38:03 -07:00
John Firebaugh
040bdb1994 [core] TileSource ⇢ TileLoader 2016-06-13 14:23:54 -07:00
John Firebaugh
b9be5fd768 [core] Simplify GeometryTile::setData 2016-06-13 10:59:34 -07:00
John Firebaugh
5c7dfd948f [core] *Tile ↔ *TileData
Tile is now the main base class; RasterTile, VectorTile, etc are its subclasses. GeometryTileData and its subclasses form the piece that's passed to the worker.
2016-06-13 10:59:33 -07:00
Young Hahn
a800d33dd8 [core] Don't earcut more than 500 inner rings 2016-05-31 10:15:18 -07:00
John Firebaugh
25eec28588 [core] Fix up v1 vector tile geometries with clipper 2016-05-31 10:15:18 -07:00
John Firebaugh
5864c8fc4c [core] Include geometry in queryRenderedFeatures results 2016-05-18 17:29:16 -07:00
John Firebaugh
1b1df9e354 [core] Add classifyRings 2016-05-18 17:29:16 -07:00
John Firebaugh
a64fe5062f [core] Simplify FilterEvaluator and fix crash
Previous implementation was assigning a temporary to FilterEvaluator<T>::extractor.
2016-05-04 09:56:34 +03:00
John Firebaugh
da78422c5c [core] Prepare Filter for public API (#4900) 2016-04-28 16:33:09 -07:00
John Firebaugh
62bbf2627a [core] Organize files that were in map folder better
Fixes #996
2016-02-11 17:30:35 -08:00