Commit Graph

18 Commits

Author SHA1 Message Date
John Firebaugh
2066295e35 Install RapidJSON from mason 2015-10-01 11:40:47 -07:00
John Firebaugh
0156ac7c8c Add test for removeAnnotation 2015-09-28 14:14:45 -07:00
John Firebaugh
af392b9434 Rewrite annotation invalidation strategy
First, move style mutation code out of StyleParser and into AnnotationManager,
coalescing it with the mutation code for shape layers.

Second, allow AnnotationManager to keep track of stale tiles entirely
internally. There's no reason to pass sets of TileIDs around.

Third, correct the logic for invalidating the shape source. Since
AnnotationManager does not track shape invalidations on a tile-by-tile basis,
don't try to invalidate the shape source tile-by-tile.

Fixes #1675
Fixes #2322
Fixes #2095
2015-09-28 14:10:23 -07:00
John Firebaugh
931c56a596 Add some shape annotation tests 2015-09-28 14:10:00 -07:00
John Firebaugh
028abaab00 Ensure that LiveTileData can be reparsed
Annotation tiles may become partially parsed just like regular tiles,
for example if a point annotation is added to the map before the style's
sprite has been loaded. In such cases, they need to be reparsed or the
annotation will not be rendered. Previously, the code path for reparsing
would be short-circuited by a dynamic_cast<VectorTileData*> followed by
a null check. This commit removes that case and adds (back) a virtual
reparse method to the TileData interface.
2015-09-28 14:10:00 -07:00
John Firebaugh
15a66b8989 Consolidate test-suite rendering harnesses (#2236) 2015-09-04 10:52:14 -07:00
Thiago Marcos P. Santos
30416c5a98 Add unit tests for addPointAnnotations()
This test would have caught #1874
2015-07-10 21:03:47 +03:00
Konstantin Käfer
675ddddee7 Make pixelRatio constant across a Map object lifetime
also moves framebuffer size out of TransformState into its own object
2015-07-08 10:40:05 +02:00
Thiago Marcos P. Santos
4623baa1a5 Add tests for renderStill() misuse 2015-06-16 14:09:51 +03:00
Konstantin Käfer
f4707f72e0 Replace mbgl::util::make_unique<> with std::make_unique<> 2015-05-26 17:57:38 +02:00
Thiago Marcos P. Santos
da81211fea Add callback for error notifications on renderStill()
The callback will be called when any of the resources requested
from the network failed to load.

There is not recovery implemented yet, so the closest thing to
reseting the Map object and reloading all the resources would
be setting a new style.
2015-05-22 10:44:18 +03:00
John Firebaugh
230027e514 Resize view from map thread 2015-04-28 14:32:24 -04:00
John Firebaugh
a625ba8a09 Remove Map::start/stop
Both Android and iOS now use pause/resume. The map thread is
always running, and be able to receive messages. When paused,
it will just refuse to render.
2015-04-28 14:32:24 -04:00
John Firebaugh
7bd735220d Fix build 2015-04-28 14:32:21 -04:00
Konstantin Käfer
71d127220b rename Mode::Static => Mode::Still 2015-04-17 17:55:24 +02:00
Konstantin Käfer
5d769f9b62 explicitly call .discard() to resize the view on static renders
- this is only a stopgap; we need to properly pass state between threads
- doesn't fix changing the pixel ratio
2015-04-17 13:40:42 +02:00
Konstantin Käfer
9af3f07e5b don't hide unchecked messages 2015-04-17 13:40:42 +02:00
Konstantin Käfer
1c920c4332 don't throw an exception in the map thread for bad styles 2015-04-17 13:40:42 +02:00