Commit Graph

98 Commits

Author SHA1 Message Date
Thiago Marcos P. Santos
3254cdc85c Log the Environment ID and the Thread name
To make it easier to debug, add the Environment ID and the Thread name
to the log messages. For instance log messages from the TileParser will look like:

[WARNING] {0}{TileWorker_15/18653/9486}[ParseTile]: some relevant warning message
   |       |             |                  |
   |       |             |                  +-> Component
   |       |             +--------------------> Thread name
   |       +----------------------------------> Environment ID
   +------------------------------------------> Severity level

Log messages that are not inside an Environment::Scope will work
normally and will look like:

[WARNING] [JNI]: some relevant warning message

Fixes #882.
2015-03-18 12:51:33 +01:00
Konstantin Käfer
48c55af5c1 fix sprites for pixel ratios that are not 1 and 2
- OpenGL ES 2 doesn't allow NPOT textures with wrap-around
- The Sprite object reported the map's pixelRatio, even though it loaded @2x assets
- Copying icons from the sprite into the atlas now uses bilinear scaling to scale up to the actual size
2015-03-17 12:30:40 +01: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
79f3149d9d Update the FixtureLog
Now the FixtureLog is an Log::Observer instead of a backend. The
observer can sniff and filter log messages, that can be used
for fail a test if it emits a warning for example.
2015-03-12 13:28:41 +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
Thiago Marcos P. Santos
2948e7d121 Simplify the logging mechanism
Move the implementation of the more specialized methods to the base
class and let the platform implement only the most generic method that
takes all the possible arguments.

These specialized methods will then map to the generic implementation
that must be provided by the platforms we support.
2015-03-12 13:28:40 +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
8408dc9e4d use a reinterpret_cast to return the correct type 2015-03-06 16:17:49 +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
Mike Morris
e8a2c39365 forward declare GLX typedefs to limit conflicts from glx.h 2015-02-10 13:38:45 -08:00
Konstantin Käfer
29baacf3a5 refactor makefile 2015-02-04 10:49:09 +01:00
Konstantin Käfer
9a549094e0 make ios compile 2015-02-04 10:49:06 +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
Leith Bade
89bbd29278 Use std::chrono 2015-02-04 09:39:25 +11:00
Leith Bade
aaedd9c83b Remove program binary caching 2015-01-27 12:38:40 +11:00
Leith Bade
ff3ea3e20b Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
Conflicts:
	platform/default/glfw_view.cpp
	platform/default/headless_view.cpp
	src/mbgl/map/map.cpp
2014-12-23 11:33:26 +13:00
Leith Bade
0771e50460 Rename View functions to match conventions. Also tidy up view classes and remove C style casts. Closes #656 2014-12-23 09:29:45 +13:00
Leith Bade
0a031e1ab0 Remove unused member 2014-12-21 23:46:50 +13:00
Leith Bade
40f859e482 Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
Conflicts:
	gyp/mbgl-ios.gypi
	gyp/mbgl-osx.gypi
	platform/default/asset_request_libuv.cpp
	src/mbgl/storage/caching_http_file_source.cpp
	src/mbgl/storage/file_request.cpp
	src/mbgl/storage/file_request.hpp
	src/mbgl/storage/file_request_baton.hpp
2014-12-18 12:39:36 +11: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
Leith Bade
df2ebadaa3 Add missing CHECK_ERROR 2014-12-11 00:14:46 +11:00
Leith Bade
d599fc5504 Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
Conflicts:
	platform/default/glfw_view.cpp
	platform/default/headless_view.cpp
	src/mbgl/renderer/painter.cpp
	src/mbgl/renderer/prerendered_texture.cpp
2014-12-11 00:09:26 +11:00
Konstantin Käfer
4ad28c931a only report STACK_OVERFLOW/STACK_UNDERFLOW when the GL implementation has them 2014-12-10 13:46:26 +01:00
Konstantin Käfer
93d56294cf update error reporting function 2014-12-10 13:21:08 +01:00
Leith Bade
6bb1a5a146 Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
Conflicts:
	include/mbgl/platform/default/headless_view.hpp
	platform/default/glfw_view.cpp
	platform/default/headless_view.cpp
2014-12-10 19:22:25 +11:00
Leith Bade
d2792e2987 Tidy up HeadlessView 2014-12-09 21:47:30 +11:00
Leith Bade
886b622a92 Add pakced depth stencil to GLFWView and HeadlessView 2014-12-07 00:40:44 +11:00
Leith Bade
b534520d6c Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
Conflicts:
	include/mbgl/platform/gl.hpp
	src/mbgl/platform/gl.cpp
	src/mbgl/shader/shader.cpp
2014-12-07 00:29:20 +11:00
Leith Bade
6df4e4a52c Load program binary extension on Linux 2014-12-06 14:21:08 +11:00
Leith Bade
de9eb00276 Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
Conflicts:
	.gitignore
	gyp/mbgl-ios.gypi
	gyp/mbgl-linux.gypi
	gyp/mbgl-osx.gypi
	include/mbgl/map/map.hpp
	src/mbgl/map/map.cpp
	src/mbgl/storage/caching_http_file_source.cpp
2014-12-05 23:16:49 +11:00
Konstantin Käfer
3b190ddd0d fix build 2014-12-04 20:13:08 +01:00
Konstantin Käfer
1e3fb3a423 remove usage of relative paths 2014-12-04 20:02:51 +01:00
Konstantin Käfer
abafb52f37 make most headers private 2014-12-04 20:02:50 +01:00
Leith Bade
1c0396690e Fixup after merge 2014-12-04 22:39:38 +11:00
Leith Bade
8f1754cf0a Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
Conflicts:
	include/mbgl/storage/base_request.hpp
	include/mbgl/storage/file_request_baton.hpp
	include/mbgl/storage/http_request.hpp
	include/mbgl/storage/http_request_baton.hpp
	include/mbgl/util/uv_detail.hpp
	platform/darwin/http_request_baton_cocoa.mm
	platform/default/caching_http_file_source.cpp
	platform/default/http_request_baton_curl.cpp
	src/map/map.cpp
	src/storage/base_request.cpp
	src/storage/file_request.cpp
	src/storage/file_request_baton.cpp
	src/storage/http_request.cpp
	src/storage/http_request_baton.cpp
2014-12-04 22:19:46 +11:00
John Firebaugh
57249ca32c Prefer stdlib to libuv (fixes #688) 2014-12-03 17:38:10 -08:00
John Firebaugh
10ebcbca93 Remove unused 2014-12-03 13:42:02 -08:00
Leith Bade
991a74774e Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
Conflicts:
	gyp/mbgl-ios.gypi
	gyp/mbgl-linux.gypi
	gyp/mbgl-osx.gypi
	platform/default/caching_http_file_source.cpp
2014-12-04 08:02:57 +11:00
Mike Morris
dac76a0f92 break out FileSource as an abstract class
add CachingHTTPFileSource implementation
2014-12-03 12:25:11 -05:00
Leith Bade
14cdd9c96f Rename lots of things 2014-12-04 01:10:43 +11:00
Leith Bade
94d34ce7ac Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
Conflicts:
	src/map/map.cpp
2014-12-03 22:02:55 +11:00
Konstantin Käfer
82f3574d09 add array overloads to make_unique and move it to mbgl::util from std 2014-12-03 11:27:24 +01:00
Leith Bade
0935cef9c3 Fix tests when using GL 3.0+ context 2014-12-02 21:40:23 +11:00
Leith Bade
2b86522412 Share asset_request between platforms 2014-12-02 19:41:50 +11:00
Leith Bade
9a8c018a32 Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason 2014-12-02 19:05:05 +11:00
Leith Bade
5ad094e823 Fix iOS compile 2014-12-02 03:43:04 +11:00
Leith Bade
2800f36142 Add debug markers and labels 2014-12-02 03:24:42 +11:00
Leith Bade
66349e33ab Add GL_ARB_debug_output 2014-12-02 03:09:09 +11:00