Use a macro to completely remove all instantiations of mbgl::gl::debugging::group so that we aren't executing the code to generate the arguments to the object instantiation
Transform::{_moveBy,_setAngle} were returning Update::Nothing, causing
the render to not repaint. Replacing with Update::Repaint fixes the
issue.
Fixes#2036.
The source returns sharded tile URLs, but sharding doesn’t buy us anything on native platforms, so always grab the first.
ref mapbox/mapbox-gl-native#2007
Clients no longer need to provide data (eg. if gesturing or in a custom
animation) to Map::nudgeTransitions().
Upon MapContext::renderSync(), a new atomic bool 'needsRepaint' in MapData
allows thread-safe communication between Map and MapContext.
Before C++11, std::list's implementation of size was O(n). It should be
all O(1) now, but it is probably still a good idea to use empty() to
emphasize the intend.
- Added HTTPRequestBase (inherits from RequestBase)
- retry() is now a pure virtual in HTTPRequestBase
- Moved cancelled bool to HTTPRequestBase
- HTTPContext now handles only HTTPRequestBase*
- Renamed HTTPNSURLRequest, HTTPCURLRequest
Following the same steps from #1548 and #1912 for GLFW and iOS ports.
Also removed a redundant check if transform state is changing since
we're already dealing with that.
- does not prepend /v4/ to api endpoints like /fonts/v1/
- only prepends it to things starting with /fontstack
- solves the problem in #1918
- refs mapbox/mapbox-gl-style-spec#309
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.
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.
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).
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.
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.
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;