Commit Graph

30 Commits

Author SHA1 Message Date
Ansis Brammanis
99c5976498 port minor collision code cleanup, fix #1705
https://github.com/mapbox/mapbox-gl-js/pull/1261
2015-08-24 18:41:51 -04:00
Ansis Brammanis
bc92c2de39 fix symbol collision detection in perspective view 2015-08-24 18:41:50 -04:00
John Firebaugh
108792420c Check for matching source when parsing tiles (fixes #1698) 2015-07-02 15:56:02 -07:00
John Firebaugh
117322d349 Don't inherit for code reuse 2015-07-02 10:12:04 -07:00
John Firebaugh
db1202e8e3 Don't pass Worker& around so much 2015-07-01 15:21:11 -07:00
John Firebaugh
abdf205510 Rename workerData ⇢ tileWorker 2015-07-01 15:21:11 -07:00
John Firebaugh
eee02425fa Single-purpose Worker functions 2015-07-01 15:21:10 -07:00
John Firebaugh
875ef979be Remove indirection 2015-07-01 15:21:09 -07:00
John Firebaugh
29a2cd908f Introduce TileWorker 2015-07-01 15:21:08 -07:00
John Firebaugh
ee46378583 Reduce number of arguments in Source::update pathway 2015-07-01 15:21:08 -07:00
John Firebaugh
4eff674c1d Revert "Do not hold a reference to the Style at the [Live|Vector]TileData"
This reverts commit 044454417b.
2015-07-01 15:21:08 -07:00
Thiago Marcos P. Santos
044454417b Do not hold a reference to the Style at the [Live|Vector]TileData
Layers are added and removed dynamically on the Map thread when we use shape
annotations and we are iterating style.layers on the Worker thread without
any lock.

Now when we create a [Live|Vector]TileData at the Map thread we give it
a layers list (instead of the Style) and [Live|Vector]TileData will ultimately
make a copy of this list (on the Map thread, so no concurrency with
adding shape annotations).

The copy should be relatively cheap because we are using a shared pointer
for storing the layers on the list.
2015-06-18 13:39:18 +03:00
John Firebaugh
a0503f3f5b Remove unused overscaling variables 2015-06-04 14:09:05 -07:00
Ansis Brammanis
1f5fb1db4a fix hangs caused by redoPlacement
After parsing a tile, it redoes placement for that tile if the angle has
changed since it started parsing. These redo calls were accidentally
done from the worker thread. Assigning the new work to `workRequest`
caused it to cancel itself.

Fix the problem by calling redoPlacement from the map thread.
2015-06-02 17:06:24 -04:00
Ansis Brammanis
1e044a175c Reparse tiles when zoom level > source maxzoom
so that layout property functions are applied correctly
and so that label placement is redone

js:
https://github.com/mapbox/mapbox-gl-js/pull/1005
and
440bc02505
2015-05-28 19:17:07 -04:00
Ansis Brammanis
8962442b1b make collision debug boxes toggleable 2015-05-28 19:17:07 -04:00
Ansis Brammanis
0bd39ae44a place symbols with correct angle on initial load 2015-05-20 19:18:53 -04:00
Thiago Marcos P. Santos
41d619771e Make the state attribute private
Also add a virtual setState() method to give subclasses a chance
to intercept the change of state. This will be used by VectorTileData
to release resources when the TileData becomes immutable.
2015-05-13 09:58:19 +02:00
John Firebaugh
5c7867f435 Join worker tasks before destroying TileData
Fixes #1309
2015-05-04 15:09:19 -07:00
John Firebaugh
cdb466e7f7 Convert Style to unique_ptr and pass by reference
Fixes #1277
Fixes #1309
2015-04-28 14:32:26 -04:00
John Firebaugh
05dc61f62c LiveTileData with no data should end up in parsed state, not obsolete 2015-04-28 14:32:23 -04:00
Justin R. Miller
c49e6157f1 add comment 2015-04-15 22:21:04 -07:00
Justin R. Miller
d29534e437 fixes #1267: properly break reference cycle with live tile data & style 2015-04-15 22:16:18 -07:00
John Firebaugh
d8411f26d2 Tile::ID ⇢ TileID
This allows making both Tile and TileID private.
2015-04-06 13:58:56 -07:00
John Firebaugh
c5292b7536 Remove always-true conditional 2015-04-06 12:59:47 -07:00
John Firebaugh
e72ee04482 Move SourceInfo into source.hpp/cpp 2015-04-06 10:30:01 -07:00
Konstantin Käfer
f73dfc73f1 make more things const and refs, and add mutexes 2015-03-20 13:14:00 +01:00
Thiago Marcos P. Santos
aa9adbb8f8 Scope the Tile worker thread to an Environment
We are also removing the code that is passing the Environment around
and instead, we get now the Environment in the TileData using
Environment::Get().

When processing the job, the work will be temporally registered to
the Environment as "TileWorker_0/0/0" which can be used for logging
in the future. At the end of the job, it gets unregistered
automatically from the Environment.
2015-03-18 12:51:33 +01:00
Justin R. Miller
76f8a3d846 fix passing of annotation manager 2015-03-17 17:45:09 -07:00
Justin R. Miller
e049ce6df1 refs #893 #992: point annotations API 2015-03-17 17:30:24 -07:00