John Firebaugh
0c1e378bc9
[core] Rewrite image handling
...
* Consolidate Image and StillImage
* Typecheck unassociated vs premultiplied images
* Rewrite default platform image decoding implementation
2015-11-25 15:57:36 -08:00
John Firebaugh
afa04de152
[core] Followup fix to #3037
...
The previous fix resulted in annotations sometimes never being added.
This would happen if, during the execution of MapContext::update where
Update::Annotations was set, the style itself was loaded but some of
its subresources (sprite or sources) were not.
#3082 is a follow up issue to make MapContext::update less error-prone.
2015-11-19 18:01:42 -08:00
John Firebaugh
db1c4f2cc2
[core] Avoid calling AnnotationManager::updateStyle until the style is loaded
...
Fixes #3037
2015-11-18 16:05:13 -08:00
Bruno de Oliveira Abinader
711d41f91b
[core] Avoid extra copy of TransformState in Painter::render
...
In MapContext thread, TransformState gets updated from main thread to
MapContext and Painter can safely reference MapContext's TransformState
instead of copying it upon each Painter::render call.
2015-11-18 09:37:27 +02:00
John Firebaugh
1caf89c32b
[core] Pass a value to response callback, not a reference
2015-11-16 12:25:47 -08:00
Thiago Marcos P. Santos
36581f3d30
[core] Do not pass uv_loop_t around
...
This should be abstracted by util::RunLoop
2015-11-16 12:25:47 -08:00
John Firebaugh
f9ebe54a63
[core] Merge Sprite into SpriteStore
2015-11-12 13:03:14 -08:00
John Firebaugh
1e350b7ea4
[core] Reorganize sprite related files
2015-11-12 13:03:14 -08:00
Konstantin Käfer
7b8b2b1790
Revert "[core] only update the render order array when there are changes to tiles"
...
This reverts commit ec1a58d8ef and 177372b836 .
2015-11-09 11:18:10 -08:00
Bruno de Oliveira Abinader
ff5d405958
[core] Update::Classes already implies repaint
2015-11-09 15:05:08 +02:00
Konstantin Käfer
ec1a58d8ef
[core] clear the render order when we're loading a new style
...
regression introduced by #2908
2015-11-06 16:42:44 +01:00
Konstantin Käfer
177372b836
[core] only update the render order array when there are changes to tiles
2015-11-05 10:33:21 +01:00
Konstantin Käfer
4d5c6333be
[core] move retry logic to DefaultFileSource
2015-11-02 17:24:40 +01:00
John Firebaugh
014b517820
[node] Output debug logs when a render test times out
2015-10-28 15:54:34 -07:00
Konstantin Käfer
5173bf1bb8
[core] Make response data shared to avoid excessive copying
2015-10-26 15:54:27 +01:00
Konstantin Käfer
6a7334b882
[core] add support for stale responses
...
We're now returning stale responses from cache. Those responses will have the `stale` flag set to true. Currently, all requesters in the core code discard stale responses, and cancel the request immediately after they got a non-stale response.
2015-10-26 15:54:27 +01:00
Konstantin Käfer
096a3edf39
[core] use RAII-style lifetime tracking of Request objects
2015-10-26 15:54:27 +01:00
Konstantin Käfer
94a5ac857f
[core] all requests have to be canceled explicitly now
...
By not automatically destroying Request objects after the result has been delivered, we are making sure that we can potentially fire the callback multiple times without adverse effects. This means that you have to hold on to the result of fs->request(), can explicitly cancel it if you don't want to be notified of data changes anymore. Not doing so will monitor the request indefinitely and will prevent the app from exiting.
2015-10-26 15:54:27 +01:00
Bruno de Oliveira Abinader
6824a24acd
[core] Removed time param from Painter::render
...
Animation time can be obtained directly from MapData.
2015-10-21 11:20:45 -07:00
Bruno de Oliveira Abinader
0045eef00a
[core] Moved Painter::setup() to Painter ctor
2015-10-21 11:20:39 -07:00
Bruno de Oliveira Abinader
ad3078e73d
[core] Remove redundant setDebug() from Painter
...
This information can be obtained directly from MapData.
2015-10-21 11:20:20 -07:00
Jason Wray
e5aab73b60
[core] only check for mapbox:// at the start of the failed request's URL
2015-10-21 11:38:01 -04:00
Jason Wray
ae5a345cc4
[core] Improve error message when style is not found or is incompatible
...
Attempting to use a Mapbox-hosted incompatible raster map/style with GL
would throw a simple 404, without any indication of the real issue.
Fix #1724 , ref #1841
2015-10-21 11:38:01 -04:00
Bruno de Oliveira Abinader
6a1b9b31a6
[core] MapContext setStyle{URL,JSON} should ignore redundant calls
...
Our engine should be robust enough to ignore redundant calls and avoid
triggering a whole style update if the style URL and/or JSON are the
same.
2015-10-16 13:16:02 +11:00
Leith Bade
2ee7b02189
[core] [android] Fix InfoWindow topOffsetPixels adjustment when switching styles
...
Fixes #2599
Make getTopOffsetPixelsForAnnotationSymbol private
Also implements MapChangeWillStartLoadingMap, MapChangeDidFinishLoadingMap
Paritally implements #630
2015-10-16 13:06:49 +11:00
Bruno de Oliveira Abinader
074d61a55e
[core] MapContext setStyle{URL,JSON} should ignore redundant calls
...
Our engine should be robust enough to ignore redundant calls and avoid
triggering a whole style update if the style URL and/or JSON are the
same.
2015-10-14 22:44:00 -07:00
Bruno de Oliveira Abinader
402819e1ad
Fix for style properties transition updates
2015-10-06 12:25:46 -07:00
Leith Bade
b869771992
Correctly handle spurious wake-ups in Map::pause()
...
Fixes #2522
2015-10-06 14:10:32 +11: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
24a5834428
Move updateAnnotationTiles[IfNeeded] to AnnotationManager
2015-09-28 14:10:01 -07:00
John Firebaugh
0c4c7ed901
map/annotation.* ⇢ annotation/annotation_manager.*
2015-09-28 14:10:01 -07:00
Justin R. Miller
d57b47b1eb
fixes #1675 : abstract annotation tile refresh check/render; trigger post-sprite/sprite store load
2015-09-11 15:09:40 -07:00
Bruno de Oliveira Abinader
0ff7cf20e9
Get rid of MapData::{get,set}NeedsRepaint
2015-09-02 23:20:47 +03:00
Bruno de Oliveira Abinader
0b501e0566
Substitute nudgeTransitions with async view invalidation
2015-09-02 23:20:46 +03:00
Bruno de Oliveira Abinader
e920328223
Provide view invalidation call coalescion via uv_async_t
2015-09-02 23:20:46 +03:00
Bruno de Oliveira Abinader
227776dee0
Style no longer requires mainloop access
2015-09-02 23:18:29 +03:00
John Firebaugh
55d25a80a7
In still mode, don't load resources until a render request is made
2015-08-31 18:09:11 -07:00
John Firebaugh
abc1c84fb8
Merge branch 'master' into node
2015-08-31 16:45:21 -07:00
Mike Morris
4540c3c0e8
View::swap -> View::beforeRender View::afterRender
...
To be able to resize the framebuffer on the map thread
in HeadlessView.
2015-08-25 14:39:49 -04:00
Bruno de Oliveira Abinader
765c4695d8
Revert "only update the render order array when there are changes to tiles"
...
This reverts commit fd98607c5f .
Fixes #2163 .
2015-08-25 11:36:10 -07:00
Konstantin Käfer
fd98607c5f
only update the render order array when there are changes to tiles
2015-08-20 16:13:46 -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
Bruno de Oliveira Abinader
ac9d5886f0
Added operator implementations for mbgl::Update enum class
2015-08-13 10:12:48 +03: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
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
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