Commit Graph

1773 Commits

Author SHA1 Message Date
Konstantin Käfer
038b65eded move RenderPass check to the StyleLayer object 2015-08-20 16:13:45 -04:00
Ansis Brammanis
19d42acc84 remove unused gaussian shader 2015-08-20 11:38:56 -04:00
Konstantin Käfer
d400fe0c91 use glClear to draw solid background fills 2015-08-19 18:49:36 -04:00
Konstantin Käfer
c53a9fd00d fix debugging names on iOS 2015-08-19 18:21:12 -04:00
Konstantin Käfer
bb0ae37c25 disable debugging groups in non-debug builds
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
2015-08-19 18:21:12 -04:00
Konstantin Käfer
85908c3381 reset the ThreadContext after the last loop iteration 2015-08-19 17:47:05 -04:00
Konstantin Käfer
90bae75838 remove mutex from LineAtlas
we're only ever accessing it from the Map thread, so there's no need for a mutex, even less for a recursive one
2015-08-19 14:42:09 -04:00
Bruno de Oliveira Abinader
fa18f1afd0 Trigger a view invalidation upon resume
Causes view to repaint when returning from pause state, fixing the black
screen perceived in some scenarios.

Fixes #2071.
2015-08-19 04:54:07 -04:00
Leith Bade
a093182c27 Merge pull request #2030 from mapbox/2029-log-threadcontext
Fix ThreadContext to check for valid current pointer
2015-08-18 16:38:01 +10:00
Thiago Marcos P. Santos
b312820be8 Restore geojsonvt version to 995ffc72c5
It was downgraded on 34d1c023de.
2015-08-13 17:29:05 +03:00
Bruno de Oliveira Abinader
5ff855bb00 Fix Update flags in mbgl::Transform
Transform::{_moveBy,_setAngle} were returning Update::Nothing, causing
the render to not repaint. Replacing with Update::Repaint fixes the
issue.

Fixes #2036.
2015-08-13 10:17:08 +03:00
Bruno de Oliveira Abinader
ac9d5886f0 Added operator implementations for mbgl::Update enum class 2015-08-13 10:12:48 +03:00
Brad Leege
72aaf3934a Merge branch 'master' into 1856-material-take-2
# Conflicts:
#	android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxgl/views/MapView.java
2015-08-12 18:22:17 -05:00
Konstantin Käfer
21ec505648 add benchmark mode that shows the real frame time rather than the vsync time 2015-08-11 16:40:40 +03:00
Leith Bade
9534d6256b Fix ThreadContext to check for valid current pointer 2015-08-11 09:41:21 +10:00
Konstantin Käfer
0a527f623e don't constantly repaint by setting needsRepaint to false
fix by @brunoabinader
2015-08-10 22:39:08 +03:00
Brad Leege
34d1c023de #1856 - Initial conversion to Material Design components 2015-08-07 13:45:56 -05:00
Minh Nguyễn
bea457697a Ignore tile URL sharding
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
2015-08-06 10:37:46 -07:00
Bruno de Oliveira Abinader
fa4636ffe4 Map::nudgeTransitions no longer depends on client information
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.
2015-08-05 15:19:00 +03:00
Bruno de Oliveira Abinader
9fd7e883a7 Coalesce view invalidation calls
Do not call for view invalidation until painter has rendered a new
frame.
2015-08-05 15:19:00 +03:00
Bruno de Oliveira Abinader
492bcf0bd7 Added Update::Repaint 2015-08-05 15:19:00 +03:00
Bruno de Oliveira Abinader
58357b7964 Removed Transform::needsTransition()
Transform::updateTransitions() already checks if there is a callback to
update transitions.
2015-08-05 15:19:00 +03:00
Bruno de Oliveira Abinader
0eb7effad7 Make MapContext use StillImageCallback definition from Map 2015-08-05 15:19:00 +03:00
Konstantin Käfer
78ec33320f don't use certain STL functions
some functions defined in <cmath>, as well as std::to_string aren't available on GNU's STL for some platforms, e.g. Android
2015-08-04 14:08:19 +02:00
Bruno de Oliveira Abinader
58b93553c1 Replace size() with empty() whenever possible
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.
2015-07-29 11:03:47 +03:00
Bruno de Oliveira Abinader
3c43171bc0 s/AssetContext/AssetContextBase/ 2015-07-28 19:27:13 +03:00
Bruno de Oliveira Abinader
0cc69b368d s/HTTPContext/HTTPContextBase/ 2015-07-28 19:27:13 +03:00
Bruno de Oliveira Abinader
590d9ab95c Created HTTPRequestBase as base for HTTP requests
- 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
2015-07-28 19:27:13 +03:00
Bruno de Oliveira Abinader
785b34df2e Moved ResponseStatus to its own header 2015-07-28 19:27:13 +03:00
Bruno de Oliveira Abinader
5e2f3b1323 Avoid nudging transitions if a gesture is in progress #2
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.
2015-07-27 21:57:51 +03:00
jakepruitt
44182a30cf Add curly-braces to if-statements 2015-07-27 10:16:14 -04:00
jakepruitt
14ba3cfd6a Adding special case for non-fontstack "glyph" resource URLs
- 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
2015-07-27 10:16:14 -04:00
Bruno de Oliveira Abinader
38f3bed63e Export default transition delay in Map public API
Added a setter/getter for default transition delay, in the same fashion
as the default transition duration.

Spin-off from #1888. Fixes #302.
2015-07-21 18:02:09 +03:00
Bruno de Oliveira Abinader
784eb35512 Revert "Revert "split renderSync and transition nudging to allow client view syncing""
This reverts commit 263f9fad30.
2015-07-20 21:59:13 +03:00
Bruno de Oliveira Abinader
f034a028be s/AppliedClassProperties/AppliedClassPropertyValues/
This class stores a list of property values which belongs to the same
property.
2015-07-20 18:14:24 +03:00
Bruno de Oliveira Abinader
51403b3c8b Cleaned up FrameHistory 2015-07-20 18:14:24 +03:00
Bruno de Oliveira Abinader
263f9fad30 Revert "split renderSync and transition nudging to allow client view syncing"
This reverts commit b8388168dd.

It seems 'nudgeTransitions()' is no longer necessary as #1548 has fixed the update issues.
2015-07-20 17:07:55 +03:00
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
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
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
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