Commit Graph

11405 Commits

Author SHA1 Message Date
Tobrun Van Nuland
7bcb3232cc [android] - update changelog for 5.1.4 release. 2017-09-26 10:40:48 +02:00
Konstantin Käfer
f281e6ae8a [core] fix loading of stale must-revalidate resources
In https://github.com/mapbox/mapbox-gl-native/pull/9670, we implemented support for the Cache-Control: must-revalidate header. While we now respect this header and don't show resources that are stale and have this header set, the optional cache request never completes. This means we're also never going to try to actually get a fresh tile and just never show this tile anymore.

This commit fixes this by responding with a Not Found error when the resource is unusable (= stale and has must-revalidate set). Since we actually still have the data (but can't use it due to caching rules), we're responding with the data as well. To avoid a second cache hit, tile_loader_impl.hpp now passes on the data from the Optional to the Required request so that it can be reused when we get a 304 Not Modified response from the server.
2017-09-25 10:47:20 +02:00
Tobrun Van Nuland
e556a57b7b [all] - use resource_class large on Circle-CI to avoid OOM 2017-09-25 10:44:17 +02:00
Tobrun Van Nuland
e6fea1e726 [android] - disable rotation gesture when pinch zooming 2017-09-25 09:38:14 +02:00
Ivo van Dongen
04d7aced4d [android] fix map in dialog activity 2017-09-22 23:33:56 +03:00
Ivo van Dongen
c6cafc5e10 [android] fix double map activity 2017-09-22 23:33:56 +03:00
Ivo van Dongen
779fc8aeee [android] example custom layer - add context lost callback 2017-09-22 23:33:56 +03:00
Ivo van Dongen
d1e69c8baf [android] CustomLayer - optionally accept a context lost callback function 2017-09-22 23:33:56 +03:00
Ivo van Dongen
97a010cc9b [core] custom layer - add contextLost callback
- optional callback method that can be used to do cleanup when the context has been lost before re-initialisation
2017-09-22 23:33:56 +03:00
Ivo van Dongen
b0c06c764b [android] re-implemented the fps listener api 2017-09-22 23:33:56 +03:00
Ivo van Dongen
bef58c38a8 [android] speed up ui tests
- Make the idling resource use a push model instead of polling for the ready state.
2017-09-22 23:33:56 +03:00
Ivo van Dongen
18bb6da109 [android] reset renderer on the GL thread when map is destroyed
- ensures cleanup of resources on the right thread
2017-09-22 23:33:56 +03:00
Ivo van Dongen
8b9794b1a7 [core] Actor/ActorRef - ask calls to void methods
- allows to wait for execution of void methods as well as non-void methods
2017-09-22 23:33:56 +03:00
Ivo van Dongen
c17be060fd [android] map snapshots 2017-09-22 23:33:56 +03:00
Ivo van Dongen
8182b26dfe [android] signal renderer when gl surface is re-initialized that gl context is lost 2017-09-22 23:33:56 +03:00
Ivo van Dongen
bda6ed26c6 [core] send signal to RenderCustomLayer when gl context has been lost
- Prevents cleaning up of GL resources that no longer exist, resulting in a crash
2017-09-22 23:33:56 +03:00
Ivo van Dongen
67285f3a95 [android] Re-initialise renderer, backend and context when the android system destroyed the underlying gl resources 2017-09-22 23:33:56 +03:00
Ivo van Dongen
6211db6968 [core] allow context to be abandoned on destruction
- This enables the use case where the system already destroyed the underlying GL resources. Otherwise, the cleanup would fail and crash
2017-09-22 23:33:56 +03:00
Ivo van Dongen
e0312ef208 [android] fix ZoomButtonController initialisation order
- prevents "java.lang.IllegalArgumentException: Receiver not registered: android.widget.ZoomButtonsController" when quitting the map before the receiver is properly registered
2017-09-22 23:33:56 +03:00
Ivo van Dongen
5d12503302 [android] self-contained map renderer
- Isolates the GL thread in a MapRenderer class with a native peer
2017-09-22 23:33:56 +03:00
Ivo van Dongen
15a47d116a [android] schedule work on the gl thread using GLSurfaceView#queueEvent 2017-09-22 23:33:56 +03:00
Ivo van Dongen
347d7c19c0 [android] async rendering
- introduces GLSurfaceView
- introduces Orchestration thread
- renders on the gl thread
2017-09-22 23:33:56 +03:00
Ivo van Dongen
e780cdc29e [android] extract RendererBackend from NativeMapView 2017-09-22 23:33:56 +03:00
Ivo van Dongen
c0544d8500 [android] remove texture view 2017-09-22 23:33:56 +03:00
Ivo van Dongen
e18da38faa [core] remove throttling from geometry tile
- This doesn't work for asynchronous rendering -  see https://github.com/mapbox/mapbox-gl-native/pull/9611
2017-09-22 23:33:56 +03:00
Konstantin Käfer
ca4f0bbcc5 [test] add test for rendering a 204 No Content tile 2017-09-22 19:24:42 +02:00
Konstantin Käfer
796386473e [glfw] Save/Restore online status of DefaultFileSource 2017-09-22 10:57:15 +02:00
Konstantin Käfer
3a8dc12a8e [glfw] Always load settings, and allow CLI args to override them 2017-09-22 10:57:15 +02:00
Konstantin Käfer
bd553de7bc [test] add ability to take the OnlineFileSource offline
This functionality is used for testing to ensure correct offline behavior when connectivity is missing.
2017-09-22 10:57:15 +02:00
Bruno de Oliveira Abinader
fc2ca19bc5 [build] Shuffle render tests in 'test-node-recycle-map' target 2017-09-21 18:31:29 -03:00
Lauren Budorick
a9ddf5b7fd Preserve depth buffer between 3D layers + optimize render order (#9931)
Port of https://github.com/mapbox/mapbox-gl-js/pull/5101: adds a new render pass `Pass3D` before any other rendering wherein we render layers with 3D passes (fill-extrusion layers) to offscreen framebuffers, sharing a depth renderbuffer between those layers in order to render 3D space correctly. Those framebuffers are saved on the RenderLayers and copied back to the map during the translucent pass. Rendering to offscreen framebuffers before we do any clear + draw means we can avoid expensive framebuffer restores.
2017-09-21 14:26:48 -07:00
Konstantin Käfer
b91d9676a6 [glfw] allow loading mapbox:// style URLs via CLI 2017-09-21 12:22:23 +02:00
Konstantin Käfer
f659aa4eda [core] make sure tiles are not treated as complete until all worker operations completed
Previously, when we started a worker operation that eventually throws an exception (e.g. due to the tile not being parseable), and then enqueue another worker operation while the first one is processing, we treated the worker as idle once the first operation's error callback fired, even though the second operation was still in progress. Due to our use of coalescing, I was unable to come up with a reliable test since we'd need to reproduce the behavior described above, which is timing dependent.
2017-09-21 12:20:54 +02:00
Konstantin Käfer
1a684c1f48 [core] keep tiles renderable even if a subsequent error occurs
Since 9a9408e811, we marked tiles as non-renderable if an error occured. This lead to situations where a tile was loaded + parsed successfully, then a revalidation attempt occured (e.g. because the resource was stale) which failed. In this case, we used to mark the tile as non-renderable although we could've used the perfectly parsed (stale) resource.
2017-09-21 12:20:54 +02:00
Tobrun Van Nuland
c9cb4ef624 [android] - set error handler when starting snapshotter, remove obsolete static keyword on interface 2017-09-21 10:38:23 +02:00
Asheem Mamoowala
2d84e2a1ae Fix platform dependent number type unsigned long -> uint64_t 2017-09-20 09:05:45 -07:00
Pablo Guardiola
2fcbd78062 [android] hook camera events into compass (#10019) 2017-09-20 10:15:56 +02:00
Ivo van Dongen
53d072cbf5 [android] ignore failed uninstalls
- ensures targets run whether the app was installed before on the device or not
2017-09-19 16:45:12 +03:00
Chris Loer
975d6b1698 [core] Don't redo placement for zoom changes at low pitch.
Fixes issue #9996
 Port of GL-JS #5284
2017-09-18 11:59:21 -07:00
Tobrun Van Nuland
00dde25022 [android] - move strings resources to dedicated files, fixup simple map activity, fixup double map activity, snapshot activity home button click fix, add activity titles, remove obsolete navigation drawer activity 2017-09-18 15:56:35 +02:00
Bruno de Oliveira Abinader
c20fdd07db [core] Bypass GeoJSON tile data update if tileID zoom is above source's maxZoom 2017-09-15 18:28:40 -03:00
Bruno de Oliveira Abinader
fe1cf83a28 [core] TransformState::getIntegerZoom should be uint8_t 2017-09-15 18:28:40 -03:00
Bruno de Oliveira Abinader
447d24bb19 [node] Added 'removeSource' 2017-09-15 18:28:40 -03:00
Bruno de Oliveira Abinader
45d07163eb [core] Reset zoom history state in still mode 2017-09-15 16:41:29 -03:00
Bruno de Oliveira Abinader
0f9773e615 [core] Partially revert ZoomHistory.lastIntegerZoom update 2017-09-15 16:41:29 -03:00
Minh Nguyễn
907a96a8f7 Mapbox develops React Native Mapbox GL
Updated the readme to acknowledge Mapbox’s official support for React Native.
2017-09-14 12:03:23 -07:00
Tobrun Van Nuland
c795d96bfb [android] - update zoom function example with selected state 2017-09-14 10:55:52 +02:00
Tobrun Van Nuland
d1354466f0 [android] - add style inspecatable in debug mode activity 2017-09-14 10:55:37 +02:00
Radosław Juszczyk
5e63e5704a Do not check connection if it is local request
Requests to servers which run on localhost should be independent from internet connection.
2017-09-14 07:45:31 +02:00
Tobrun Van Nuland
f0bf2c94ae [android] - harden offline region deletion 2017-09-14 07:44:56 +02:00