Commit Graph

4573 Commits

Author SHA1 Message Date
Bruno de Oliveira Abinader
0753aad57b Check for pending animations or transitions when scheduling another render pass
In continuous mode, we need to check if there are any pending animations or
transitions so we can properly tell the client application that another render
pass is required.
2015-07-20 14:38:19 +03:00
Thiago Marcos P. Santos
234a653931 Use the observer pattern for GlyphPBF loading
This will make the code a lot more clear and it will
also move how parsing is initiated to the GlyphPBF
class, to be initiated after the request, like we do
for other resources.
2015-07-17 21:00:34 +03:00
Thiago Marcos P. Santos
dbf3edad8a Add docs to WorkQueue and GlyphStore 2015-07-17 20:58:38 +03:00
Thiago Marcos P. Santos
38351554f4 Only print Sprite warnings if we have Sprites set
If we don't set Sprites at all or the Sprites were not
loaded yet, the warnings can be misleading.
2015-07-16 20:15:14 +03:00
Thiago Marcos P. Santos
dd818874cc Remove hacks because of Glyph requests could not be canceled 2015-07-16 19:38:39 +03:00
Thiago Marcos P. Santos
cd2c1200c8 Add GlyphStore unit tests 2015-07-16 19:38:39 +03:00
Thiago Marcos P. Santos
a75cc8c06b Make Glyph requests from the Map Thread
Now the requests are bound to the Map Thread loop and
we can cancel it quickly when shutting down or changing
style.

Previously requests were made by the workers and we would
have to wait them to finish because workers are destroyed
before the GlyphStore. This was giving the impression that
the application was frozen (in fact it was, momentarily).
2015-07-16 19:38:39 +03:00
Thiago Marcos P. Santos
c6e58515fc Keep updating until all the tiles are State::parsed
This is needed because of a race that can occur now that we
requests Glyphs from the Map Thread:

The glyph might arrive at the moment a tile is being parsed
and they won't be notified again of any new data, remaining
forever at the partial state.
2015-07-16 19:38:38 +03:00
Thiago Marcos P. Santos
7d4349e308 Added unit tests for the WorkQueue 2015-07-16 19:38:38 +03:00
Thiago Marcos P. Santos
7d500e9330 Introduce the WorkQueue
The WorkQueue allow other threads to submit tasks to be executed in
the thread that the WorkQueue lives on.

The WorkQueue will cancel all the pending tasks when it gets
destructed, to make sure the tasks won't get called with
invalid references.
2015-07-16 19:38:35 +03:00
Thiago Marcos P. Santos
70aea89e13 Add an interface for invoking cancellable tasks on the RunLoop
This is interface is going to be used the WorkQueue in the following
patches.
2015-07-15 16:16:51 +03:00
Minh Nguyễn
3c1d46113e [publish ios-v0.5.2] 2015-07-14 11:29:02 -07:00
Minh Nguyễn
38d8d1820d Bumped podspec to 0.5.2 with symbols 2015-07-14 10:55:36 -07:00
Minh Nguyễn
1f78d28516 Merge branch 'release-v0.5.0' 2015-07-14 10:49:52 -07:00
Bruno de Oliveira Abinader
bef3e1590b Force style cascade in MapContext::loadStyleJSON
Fixes #1889.
2015-07-14 18:12:52 +03:00
Bruno de Oliveira Abinader
0ea8a37cb0 Unify default transition values in MapData
Relevant changes:
 - Added 'defaultFadeDuration' and 'defaultTransitionDelay' to MapData;
 - Painter & StyleParser now receives a reference to MapData;
 - As previously seen on the code: 300ms is the default fade duration
   and 0ms is the default transition duration;
 - We no longer pass the current time point to Style, since it now uses
   MapData.animationTime, which gets updated in MapContext::update().
 - Updated StyleParser check to use a mock MapData;
2015-07-14 16:58:32 +03:00
Bruno de Oliveira Abinader
2aad2f4e14 Pass {Duration,TimePoint} by const ref if possible 2015-07-14 16:48:34 +03:00
Bruno de Oliveira Abinader
7d8b4dc6c0 s/properties/propertyValues/
This list stores different values for the same property, but the
property itself remains the same.
2015-07-14 16:44:42 +03:00
Bruno de Oliveira Abinader
7023ea061c Unify time point for Mapcontext::update
- Let style classes cascade use the same time point as the one used to
  recalculate style.
- Cleaned up MapContext::update to return early whenever possible.
- Cleaned up MapContext::loadStyleJSON to avoid redundant calls to style
  classes cascade.
2015-07-14 16:44:42 +03:00
Bruno de Oliveira Abinader
77a91f64d8 Micro-optimizations to Style 2015-07-14 16:43:07 +03:00
Thiago Marcos P. Santos
938165de17 Re-enable the Satellite style on the Linux/OSX app 2015-07-14 14:26:40 +03:00
Minh Nguyễn
27bd305b1b Include iOS README in binary pod 2015-07-13 14:25:10 -07:00
Thiago Marcos P. Santos
805c8b26f7 Do not return a value on a "[]() -> void"
This is an undefined behavior, and it is a mystery why the
compiler was not complaining about it.
2015-07-13 22:44:53 +03:00
Minh Nguyễn
f5e38ee21a [publish ios-v0.5.1] 2015-07-13 10:52:57 -07:00
Minh Nguyễn
970ad1fe1b Updated podspec for 0.5.1 2015-07-13 10:50:51 -07:00
Minh Nguyễn
b65f30966b Updated changelog for 0.5.1 2015-07-13 10:15:33 -07:00
Minh Nguyễn
c066931a49 Opt into Xcode 6.4
Cherry-picked from 5f7575dd8f to fix the build.
2015-07-13 10:07:50 -07:00
Minh Nguyễn
1350ed7654 Fetch tags before relying on a list of them
Cherry-picked from 482b8bde63 to fix the build.
2015-07-13 09:50:53 -07:00
Minh Nguyễn
482b8bde63 Fetch tags before relying on a list of them 2015-07-13 09:32:34 -07:00
Minh Nguyễn
cf9e41be0d Force -ObjC in Mapbox GL pod
Fixes #1849.

Cherry-picked from 97b7307f35.
2015-07-13 09:12:33 -07:00
Minh Nguyễn
cf56ed3698 Replaced release notes for 0.5.0
Replaced the release notes with more detailed ones from <https://github.com/mapbox/mapbox-gl-native/milestones>. This change also fixes a build error due to a reference to a method that had been removed.

Cherry-picked from 9bb5032103.
2015-07-11 15:43:16 -07:00
Minh Nguyễn
5f7575dd8f Opt into Xcode 6.4 2015-07-11 15:40:39 -07:00
Minh Nguyễn
f96fef8292 Create GLKView before binding it and resuming
Or: don’t resume the map until the application has entered the foreground.

UIApplicationWillEnterForegroundNotification is posted before UIApplicationDidBecomeActiveNotification, while the application is still in the background. That caused -createGLView to bail but did not cause the rest of -wakeGL: to bail. We would create the GLKView only after attempting to bind it (a no-op), resulting in a black view.

Fixes #1855.
2015-07-11 15:38:59 -07:00
Thiago Marcos P. Santos
00308be140 Make one arg ctors explicit 2015-07-11 12:42:45 +03:00
Thiago Marcos P. Santos
bd8210d5a1 Remove unused function: elapsed() 2015-07-11 12:42:45 +03:00
Thiago Marcos P. Santos
67554cae41 Remove unused function: uv_zip_open() 2015-07-11 12:42:45 +03:00
Thiago Marcos P. Santos
06e27f905e Mark overrides
Detected by clang++-3.6
2015-07-11 12:42:45 +03:00
Thiago Marcos P. Santos
a1c701ca93 Remove unused variable 2015-07-11 12:42:45 +03:00
Thiago Marcos P. Santos
d207166abe Remove unused function: cwd() 2015-07-11 12:42:45 +03:00
Minh Nguyễn
97b7307f35 Force -ObjC in Mapbox GL pod
Fixes #1849.
2015-07-10 16:01:58 -07:00
Minh Nguyễn
06fd6d5c1e Cherry-picked part of 987d961e5b to fix the build 2015-07-10 11:42:46 -07:00
Minh Nguyễn
9bb5032103 Replaced release notes for 0.5.0
Replaced the release notes with more detailed ones from <https://github.com/mapbox/mapbox-gl-native/milestones>. This change also fixes a build error due to a reference to a method that had been removed.
2015-07-10 11:33:43 -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
Thiago Marcos P. Santos
0d44402628 Move MockFileSource to fixtures
It is going to be used by another test that needs to emulate
asynchronous requests.
2015-07-10 21:03:23 +03:00
Thiago Marcos P. Santos
8a9665b085 Deffer updateAnnotationTiles() if Source is not available
The Style object might have been created but the Source is not
yet available because the JSON file was not set. Can happen
specially when the style is loaded from the network.
2015-07-10 20:25:49 +03:00
Nicki Dlugash
d63f706c5f Merge pull request #1840 from mapbox/repeat-distance
Updates to labels along lines
2015-07-10 10:59:37 -04:00
Thiago Marcos P. Santos
a666c08274 Add unit tests for the Sprite class 2015-07-10 15:35:26 +03:00
Ansis Brammanis
1f2d439059 update test-suite 2015-07-10 12:52:51 +02:00
Thiago Marcos P. Santos
7fc6d0444c Re-enable Sprite resource loading tests 2015-07-10 10:48:46 +03:00
Thiago Marcos P. Santos
b33d5d8a95 Do not report isLoaded() if loading failed 2015-07-10 10:48:46 +03:00