Commit Graph

35 Commits

Author SHA1 Message Date
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
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
Konstantin Käfer
b0a30943b4 move most private Map code to MapContext 2015-04-28 14:32:20 -04:00
Konstantin Käfer
452d12e6e6 make implementation files private headers 2015-04-13 18:28:18 +02:00
Konstantin Käfer
16849a341b hide Thread<> and separate the Implementation object 2015-04-13 17:57:45 +02:00
Konstantin Käfer
4c7132337f convert DefaultFileSource to use util::Thread<> 2015-04-10 22:37:27 +02:00
Konstantin Käfer
bba3d9838a add Thread<T> and RunLoop
Thread<T> is a generic thread management object that starts a thread, creates an object T in that thread and calls its .start() function. When the Thread<T> object is destructed (which must happen in the thread that created it), it'll call the object's .stop() function, and wait for thread termination. The .stop() function must somehow get the thread to terminate. Note that object T's constructor/destructor/start()/stop() must be protected/private, and Thread<T> must be declared as a friend class. All public functions may be called from any thread and are exposed through operator->().

RunLoop encapsulates a libuv runloop and has a facility of dispatching function objects to the thread. It can be used either as a worker thread class by itself, or it can be derived from. This commit converts SQLiteCache to derive from RunLoop and removes the custom code used previously for managing the cache thread.
2015-04-10 15:36:32 +02:00
John Firebaugh
9331acf8e6 Add typedefs for std::chrono::steady_clock types 2015-04-02 12:28:12 +02: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
Leith Bade
5c79baedf9 Add projection functions to Java 2015-02-19 14:28:49 -08:00
Leith Bade
4daa02987b Tidy up JNI LatLng refs 2015-02-19 14:28:49 -08:00
Konstantin Käfer
29baacf3a5 refactor makefile 2015-02-04 10:49:09 +01:00
Leith Bade
89bbd29278 Use std::chrono 2015-02-04 09:39:25 +11:00
Leith Bade
f65a74bbeb Remove excess semicolon in jni.hpp 2015-01-28 11:17:43 +11:00
Leith Bade
95e653982d Throw on egl errors 2015-01-22 23:47:09 +11: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
2db8134d20 Add Android user-agent info 2014-12-10 19:14:05 +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
b1c793d1e0 Add fps mode for #646 2014-11-28 00:19:11 +11:00
Leith Bade
fbbcdca235 Perfer 16 bit depth, handle long GL extension strings 2014-11-28 00:11:37 +11:00
Leith Bade
a438459e3b Rewrite EGL config choosing 2014-11-22 21:40:49 +11:00
Leith Bade
900f6e87fa Fix null string crash 2014-11-18 22:47:57 +11:00
Leith Bade
f0e4e27cd3 Read styles from APK 2014-11-17 23:17:22 +11:00
Leith Bade
7d66632209 Change to proper Log functions 2014-11-15 11:14:37 +11:00
Leith Bade
7877d0505e Fix crash 2014-11-12 23:17:07 +11:00
Leith Bade
49da2c2fa5 Tidy code up more 2014-11-12 22:00:44 +11:00
Leith Bade
6b9e3c60ef Renamed source files using mapbox style
Move headers to mbgl/android
Tidy up headers and includes
2014-11-12 21:17:24 +11:00