Commit Graph

62 Commits

Author SHA1 Message Date
Leith Bade
85ec3eb0a5 Refactor Android render loop to limit frame rate to 60 FPS
Move expensive cache size calulation to initialisation
Fix setGestureInProgress bug
Renamed several functions to match current usage
Refactor map updates to reduce GPS marker lag
Fixes #1676
Fixes #2290
Fixes #2396
2015-09-24 18:04:26 +10:00
Leith Bade
2c4a9f6a3b Refactor NativeMapView to hold std::unique_ptr to Map and DefaultFileSource
Add missing asserts to attach_jni_thread/detach_jni_thread
Fixes #2406
2015-09-24 12:22:19 +10:00
Leith Bade
8cf927f6c4 Improve handling of cancelled HTTP requests
Fix a memory leak of NativeMapView Java object
2015-09-23 11:57:41 +10:00
Leith Bade
feae692dba Fix freezing on Android when rotating
Fixes #1941
2015-09-22 16:23:39 +10:00
Leith Bade
529a7cc93c Create SharedSQLiteCache 2015-09-16 12:45:46 +10:00
Justin R. Miller
e78eacefdb plumb map notifications through JNI to Android 2015-09-04 10:00:44 -07:00
Bruno de Oliveira Abinader
0b501e0566 Substitute nudgeTransitions with async view invalidation 2015-09-02 23:20:46 +03: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
Leith Bade
0cbe7e07f5 Use OkHTTP to implement HTTPContext on Android.
Closes #823
2015-08-11 11:59:08 +10: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
492bcf0bd7 Added Update::Repaint 2015-08-05 15:19:00 +03:00
Leith Bade
d57a02f3a9 First pass at updating JNI bindings
Hook up collisionDebug, isFullyLoaded, onLowMemory in Android
Rename class to styleClass in Java to match iOS
Fixed some formatting
Fixes #1905
Fixes #1946
Fixes #1263
2015-07-29 12:17:42 +10:00
Bruno de Oliveira Abinader
3512da9609 Avoid nudging transitions if a gesture is in progress
We're now using nudgeTransitions() to tell the Map view that we want to
update it. However, if we're on a gesture movement, the update() call
can get called too fast and causing general slowdown. This check ensures
we only call for nudgeTransitions() after all gesture events are
finished. Fixes the issue pointed out by #1548 on Android.
2015-07-23 17:43:05 +03:00
Konstantin Käfer
675ddddee7 Make pixelRatio constant across a Map object lifetime
also moves framebuffer size out of TransformState into its own object
2015-07-08 10:40:05 +02:00
John Firebaugh
d193083513 Remove duration argument from View::notifyMapChange
Fixes #1026
2015-06-26 10:32:07 -07:00
Konstantin Käfer
dca42018d2 drive Android rendering from the main thread via invalidate() calls 2015-06-26 10:32:06 -07:00
Konstantin Käfer
84e2ea886d drive map rendering from main thread 2015-06-26 10:32:06 -07:00
Konstantin Käfer
f4707f72e0 Replace mbgl::util::make_unique<> with std::make_unique<> 2015-05-26 17:57:38 +02:00
John Firebaugh
7d4f12434e Ensure call-once semantics inside InitializeExtensions 2015-05-13 19:01:58 -07:00
John Firebaugh
a2344c36c3 Extensible GL extension support 2015-05-13 19:01:58 -07:00
John Firebaugh
0f7c6b0b52 Remove unused GL feature flags
These were used only for prerendered textures, which were removed.
2015-05-13 19:01:57 -07:00
Leith Bade
703e0bc2ee Ignore deactivate when no valid EGL display. Fixes #1435
Initialise NativeMapView's EGL variables before Map

Fix hang

Add check for double pause

Add test for double pause
2015-05-09 12:02:39 +10:00
John Firebaugh
00a1f44cfc Ensure no GL commands are executed after pause 2015-05-04 18:27:48 -07:00
John Firebaugh
3bf0bf9538 Remove unused includes 2015-04-28 14:32:25 -04:00
John Firebaugh
230027e514 Resize view from map thread 2015-04-28 14:32:24 -04:00
John Firebaugh
a625ba8a09 Remove Map::start/stop
Both Android and iOS now use pause/resume. The map thread is
always running, and be able to receive messages. When paused,
it will just refuse to render.
2015-04-28 14:32:24 -04:00
John Firebaugh
6c7a01a503 Following kkaefer's view changes 2015-04-28 14:32:22 -04:00
Konstantin Käfer
dae18cc7bc remove some unused includes 2015-04-28 14:32:21 -04:00
Konstantin Käfer
b0a30943b4 move most private Map code to MapContext 2015-04-28 14:32:20 -04:00
Konstantin Käfer
47ede853c4 fixes black flicker on rotating the device
fixes #838

instead of rendering ad libitum on the map thread, we are now driving rendering from the UI thread on iOS via the map.renderSync() function. There are still white bars during the rotation, but the general content of the view is kept visible.

- upgrades GLFW to 3.1
- removes swapped/needsSwap in favor of a more explicit scheme
- View#invalidate() now replaces View#swap() and is called whenever the View needs to trigger a rerender. GLFW and Android to this right away, while iOS goes back to the main thread and does the Map redrawing as part of the GLKView update
- sets all iOS deployment targets to 7.0
- disables SQLite3 version check, since the library version changed on iOS 8.2
2015-03-12 12:16:38 +01:00
Konstantin Käfer
e8389d82cd guard against concurrent OpenGL extension loading 2015-03-06 15:42:34 +01:00
Konstantin Käfer
fb44fc81bd make Map::resize() private
they can only be called by View::resize
2015-03-06 13:52:25 +01:00
Konstantin Käfer
29baacf3a5 refactor makefile 2015-02-04 10:49:09 +01:00
Konstantin Käfer
8a1fce547e rearrange tests and add storage tests 2015-02-04 10:49:05 +01:00
Leith Bade
89bbd29278 Use std::chrono 2015-02-04 09:39:25 +11:00
Leith Bade
95e653982d Throw on egl errors 2015-01-22 23:47:09 +11:00
Leith Bade
d29fe6fe92 Remove binary shader caching on Android since OS already does this 2015-01-13 20:42:48 +11:00
Leith Bade
8eceb082ba Add failsafe to program binary loading 2015-01-05 12:28:32 +13:00
Leith Bade
e6b8c4c047 Clang-format on Android code 2015-01-02 10:14:00 +13:00
Leith Bade
ae9fb18a8d Rename View functions 2014-12-23 11:34:27 +13:00
Leith Bade
b5483d3e81 Remove C style casts 2014-12-22 19:42:18 +13:00
Leith Bade
2a71d54fca Add missing GL extensions 2014-12-22 16:56:20 +13:00
Leith Bade
434b2e8070 Missing asserts 2014-12-06 01:46:10 +11:00
Leith Bade
c26430739f Merge classes 2014-12-06 01:11:16 +11:00
Leith Bade
93ab4036e9 Fix commit 2014-12-06 00:50:23 +11:00
Leith Bade
2b06d905f6 Fix Map with CachingHTTPFileSource 2014-12-04 08:11:09 +11:00
Leith Bade
14cdd9c96f Rename lots of things 2014-12-04 01:10:43 +11:00
Leith Bade
9db5d2ac55 Remove boost::make_unique 2014-12-03 22:27:40 +11:00
Leith Bade
67d513816a Fix typo 2014-12-02 04:42:07 +11:00
Leith Bade
b1c793d1e0 Add fps mode for #646 2014-11-28 00:19:11 +11:00