Konstantin Käfer
61fa436193
coalesce buffer deletions and run them in bulk during rendering
...
On iOS, the main thread does framebuffer operations just before it requests a rerender of the view contents. This means that GL operations on the Map thread will interfere with that and cause a crash. While most GL operations happen throughout rendering (which is synchronized with the main thread), deletion of shared_ptrs release in turn their OpenGL objects. This may happen at any time and isn't synced with rendering.
This patch changes this so instead of deleting all objects immediately, we are collecting all abandoned IDs and delete them in bulk once the main thread has given us permission to use OpenGL calls (i.e. during render()).
2015-03-20 19:47:54 +01:00
Thiago Marcos P. Santos
b5facd35bc
Scope the Map thread to an Environment
...
Also, replace manual thread type checks with Environment::currentlyOn().
2015-03-18 12:51:33 +01:00
Justin R. Miller
e049ce6df1
refs #893 #992 : point annotations API
2015-03-17 17:30:24 -07:00
John Firebaugh
0c985c024b
Revert "Move atlas ownership to Style"
...
This reverts commit bffee07154 .
2015-03-13 13:05:32 -07:00
John Firebaugh
bffee07154
Move atlas ownership to Style
...
This follows gl-js and just makes sense -- whenever the style changes
the atlases should be blown away.
Refs #957
2015-03-13 10:55:47 -07: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
9781785ab7
scope Requests to an Environment object for easier cancelation
...
we are now scoping all file requests to an environment object. The FileSource implementation treats
this as an opaque pointer, but allows canceling all Requests that are associated with that pointer.
This is necessary to abort all file requests that originated from a particular Map object. Aborting
a file request is different from canceling a file request: A canceled request doesn't have its
callback called, while an aborted request will have its callback called with an error, indicating
that the environment is going to be shut down.
2015-03-06 08:21:47 -08:00
Konstantin Käfer
e00bae4f1c
lock the StyleBucket to avoid crashing
...
stopgap until we have a solution that doesn't mutate the style objects while parsing a tile
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
8e42582c52
update static image rendering executable
2015-03-06 12:41:00 +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
704b3719f5
use standard DEBUG macro rather than NDEBUG
2015-02-04 10:49:07 +01:00
Konstantin Käfer
b9bf66e67e
rewrite storage layer to be independent of the Map's event loop
2015-02-04 10:46:37 +01:00
Leith Bade
89bbd29278
Use std::chrono
2015-02-04 09:39:25 +11:00
Leith Bade
42d1972732
Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
...
Conflicts:
src/mbgl/renderer/painter_prerender.cpp
src/mbgl/renderer/prerendered_texture.cpp
src/mbgl/renderer/prerendered_texture.hpp
2015-01-23 11:11:04 +11:00
John Firebaugh
a8b6e3dc71
Merge remote-tracking branch 'origin/dash-3' into v7
2015-01-22 13:06:30 -08:00
Leith Bade
5feba9ac07
get/setAppliedStyleClasses -> get/setClasses
2015-01-18 17:05:01 +11:00
Leith Bade
016c2948c5
Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
...
Conflicts:
src/mbgl/map/map.cpp
2015-01-18 16:33:39 +11:00
Ansis Brammanis
2643a0efc7
start porting dash lines from js
...
- switches to dash units that are scaled by line width
- adds a lineatlas to store patterns line dashed lines
- adds linesdf shader which renders line fill from the lineatlas
js: 8e83d76af3bd877eb9639c02e296363e2c0186f8
2015-01-14 20:56:18 -05:00
John Firebaugh
d24b73b1a6
Move class state to map
...
https://github.com/mapbox/mapbox-gl-js/pull/936
2015-01-14 17:43:44 -08: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
df19683b6a
Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
...
Conflicts:
Makefile
platform/default/headless_view.cpp
src/mbgl/map/map.cpp
2014-12-21 15:02:47 +13:00
Konstantin Käfer
21e9e0a5ea
set rendering mode so that we can skip intermediate renders for static images
2014-12-12 15:01:09 +01:00
Leith Bade
0487b0c6a3
Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
...
Conflicts:
src/mbgl/map/map.cpp
2014-12-08 20:19:41 +11:00
John Firebaugh
de098591c5
Remove Map::cleanup and Painter::cleanup
...
Both were noops.
2014-12-06 14:08:40 -08: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
John Firebaugh
ff640132de
Move setAccessToken to CachingHTTPFileSource
2014-12-04 17:03:23 -08:00
John Firebaugh
0a942b6f14
Change Map::stop to use std::function<void()>
...
Fixes #685
2014-12-04 15:58:04 -08:00
John Firebaugh
16fe8e64c4
Move setReachability to CachingHTTPFileSource
2014-12-04 15:14:40 -08:00
Konstantin Käfer
abafb52f37
make most headers private
2014-12-04 20:02:50 +01:00
Konstantin Käfer
b449b22abc
remove use of std::to_string in favor of boost::lexical_cast
...
std::to_string calls sprintf() internally, which is really slow
2014-12-04 12:59:09 +01: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
Konstantin Käfer
65451187f5
[performance] remove use of snprintf in hot path; it's pretty slow on iOS
2014-12-04 12:19:21 +01:00
John Firebaugh
57249ca32c
Prefer stdlib to libuv ( fixes #688 )
2014-12-03 17:38:10 -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
35b0e2bfbd
Fix names in Map
2014-12-03 20:09:16 +11:00
Leith Bade
8762d5a9b6
Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
...
Conflicts:
include/mbgl/map/map.hpp
src/map/map.cpp
2014-12-03 19:56:20 +11:00
John Firebaugh
a6522d4a5a
Texturepool ⇢ TexturePool ( fixes #655 )
2014-12-02 12:24:25 -08:00
John Firebaugh
8fdf645e12
Adhere to naming conventions
2014-12-02 12:24:25 -08:00
Leith Bade
8ae2cd3985
Merge branch 'master' of github.com:mapbox/mapbox-gl-native into android-mason
...
Conflicts:
README.md
configure
gyp/mbgl-linux.gypi
include/mbgl/map/map.hpp
include/mbgl/platform/default/image_reader.hpp
include/mbgl/platform/default/jpeg_reader.hpp
include/mbgl/platform/default/png_reader.hpp
include/mbgl/util/uv_detail.hpp
ios/mapbox-gl-cocoa
platform/default/image.cpp
platform/default/image_reader.cpp
platform/default/jpeg_reader.cpp
platform/default/png_reader.cpp
src/map/map.cpp
2014-11-28 01:51:21 +11:00
John Firebaugh
7901706094
Use uv::async
2014-11-26 17:37:13 -08:00
John Firebaugh
84c3191044
Eliminate Map::getActiveSources()
2014-11-26 16:04:22 -08:00
John Firebaugh
01ecbaf51a
Make Map::updateTiles() private
2014-11-26 16:01:51 -08:00
John Firebaugh
4ce94170c1
Remove unused
2014-11-26 16:01:36 -08:00
John Firebaugh
12bf2fd326
Inline Source::updateTiles()
2014-11-26 16:01:15 -08:00
John Firebaugh
80df07a5da
Remove redundant access specifiers
2014-11-26 15:13:14 -08:00
John Firebaugh
41e90b4150
Pass SourceInfo as reference
2014-11-26 15:13:14 -08:00
John Firebaugh
23b61f808c
Eliminate remaining uses of Map in TileData
2014-11-26 15:13:14 -08:00