Commit Graph

137 Commits

Author SHA1 Message Date
Thiago Marcos P. Santos
d515f84caf [core] Remove unused libuv includes 2015-12-01 11:49:01 +02:00
Bruno de Oliveira Abinader
1f0820c8e8 [core] Added MapDebugOptions
Map debug options are now cycled up to all debug options enabled, then
back to none.
2015-11-27 17:47:02 +02:00
Konstantin Käfer
85ab48636c [core] allow changing pitch in GLFW based apps 2015-11-17 19:02:12 +01:00
Konstantin Käfer
69564cc886 [core] fix logging so we don't use strings as a formatter 2015-11-06 10:16:52 +01:00
Mike Morris
dfb36d6231 [core] move mbgl.gyp to gyp directory
So npm won't clobber binding.gyp, refs
https://github.com/npm/npm/issues/10243
2015-11-04 11:34:35 -05:00
Minh Nguyễn
557b8afb7c [core][iOS] Source iOS styles from default_styles
Moved mbgl::util::default_styles to a more appropriate location, where iOS platform code can also find it. Moved -[MGLMapView bundledStyleURLs] (which is now deprecated) and the style switcher in iosapp to default_styles.

Added a collection of convenience methods for getting style URLs. It makes little sense to layer an enum atop this, as MapKit does, because MGLMapView styles aren’t limited to this set. A good analogy is UIColor. This also makes for a good entry point for future runtime styling APIs.

Introduced independent constants for each default style, because it’s more common to need access to a particular style than to iterate over them. This fact is apparent in the MGLStyle class, which now uses macros and assertions to ensure that it’s kept up-to-date with changes in default_styles.

/ref #1462
2015-10-30 13:09:37 -07:00
Leith Bade
abf93c008b [core] Remove bundled styles.
Fixes #2239
2015-10-30 13:09:04 -07:00
Mike Morris
b46c102eb0 mason variant@1.0 2015-09-30 15:34:40 -07:00
Konstantin Käfer
5a79bd832d allow setting a location and print the location on exit 2015-08-11 16:40:40 +03: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
Konstantin Käfer
e6053aa547 Make build system architecture agnostic to remove Android special case 2015-08-04 14:08:58 +02:00
Konstantin Käfer
b44fe1c7af use OpenGL and Boost for the linux app 2015-08-04 14:08:20 +02:00
Konstantin Käfer
ac0b634bac respect fullscreen flag in Linux app 2015-08-04 14:08:20 +02: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
Konstantin Käfer
f4707f72e0 Replace mbgl::util::make_unique<> with std::make_unique<> 2015-05-26 17:57:38 +02:00
John Firebaugh
87b1da7611 DefaultFileSource has responsibility for handling mapbox:// URLs 2015-05-26 12:14:10 +02:00
Konstantin Käfer
7dbe768ffc change the window title to indicate the current style 2015-05-07 11:01:15 +02:00
Thiago Marcos P. Santos
769364c117 Make all GLFWView attributes private 2015-05-07 11:01:15 +02:00
Thiago Marcos P. Santos
168d7c4f17 Add style change functionality to the Linux test app
Makes the life of people using Linux as development environment way
easier.

Just press 's' to cycle through 3 different styles.
2015-05-07 11:01:15 +02:00
Konstantin Käfer
c298ac9d3a on OS X, styles for the linux test app weren't bundled correctly 2015-05-07 10:51:29 +02: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
0d5568f724 merge build targets so we only have one build file per platform
previously, we used multiple different projects for various targets (app, test, render) that overwrote each other, so it was impossible to have one project to build them all, one project to compile them, one project to run them all and in the darkness bind them
2015-04-24 11:50:50 +02: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
Thiago Marcos P. Santos
490c172b35 Delete the GLFWView object at exit
Also destroy the glfwWindow we create. This leak was probably harmless
but a nice cleanup helps us debug other serious memory leaks.
2015-03-20 14:38:08 +02:00
Konstantin Käfer
5e40f72b7c scripts for running linux tests with docker 2015-03-13 12:06:11 +01:00
Thiago Marcos P. Santos
124b49562d Get rid of printf and cout by using Log::*
Use our logging system that will route the message accordingly on
the target platform.

Fixes #613
2015-03-12 14:19:32 +02:00
Thiago Marcos P. Santos
2b6afe6a54 Merge pull request #972 from mapbox/log_cleanup
Refactoring of the log system
2015-03-12 14:18:25 +02:00
Thiago Marcos P. Santos
51bc265db3 Make the logging system static
No initialization is needed anymore and we can use the logging functions
safely at any point of the code (threading is not handled though, so you
might get multiplexed messages if you log from two threads
simultaneously).
2015-03-12 13:28:41 +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
Justin R. Miller
6e41664cb0 fixes #476 & #853: pixel/meter/latlng conversion routines in core & iOS 2015-02-16 09:52:36 -08:00
Konstantin Käfer
29baacf3a5 refactor makefile 2015-02-04 10:49:09 +01:00
Konstantin Käfer
46553ff00c rework linux gyp files 2015-02-04 10:49:08 +01:00
Konstantin Käfer
704b3719f5 use standard DEBUG macro rather than NDEBUG 2015-02-04 10:49:07 +01:00
Konstantin Käfer
272fa8935e make storage lib separate so we can build without storage libs 2015-02-04 10:49:07 +01:00
Konstantin Käfer
92a7f73bbe fixes for linux 2015-02-04 10:49:06 +01:00
Konstantin Käfer
8a1fce547e rearrange tests and add storage tests 2015-02-04 10:49:05 +01:00
John Firebaugh
9495b686e7 Use v7 styles / tests 2015-01-22 12:00:26 -08:00
Mike Morris
0d1764c43e sqlite3_static_libs on linux 2015-01-13 14:31:50 -05:00
Konstantin Käfer
b5e9998b15 change file:// to asset:// to indicate that they aren't arbitrary files
refs #579
2014-12-17 14:59:05 +01:00
Konstantin Käfer
936e096514 Make file request overridable by platform implementations
refs #579: Android can now rename AssetRequest to FileRequest and implement it differently
2014-12-17 12:14:32 +01:00
John Firebaugh
ff640132de Move setAccessToken to CachingHTTPFileSource 2014-12-04 17:03:23 -08:00
Konstantin Käfer
abafb52f37 make most headers private 2014-12-04 20:02:50 +01:00
Mike Morris
dac76a0f92 break out FileSource as an abstract class
add CachingHTTPFileSource implementation
2014-12-03 12:25:11 -05:00
artemp
759a5e65cf simplify image_readers creation implementation
* remove static callbacks registration
* link png_reader/jpeg_reader into mbgl-linux lib
2014-11-19 13:06:47 +01:00
artemp
dfeab9f921 move image_reader to mbgl-linux 2014-11-07 15:31:18 +00:00
artemp
aafb1280b2 add cflags for linux builds 2014-11-07 15:20:34 +00:00
artemp
f42d39dc6e add image_reader abstraction layer to hanfle multiple image formats
(work-in-progress)
2014-11-07 11:49:31 +00:00