diff options
author | Mike Morris <michael.patrick.morris@gmail.com> | 2014-09-10 18:53:20 -0400 |
---|---|---|
committer | Mike Morris <michael.patrick.morris@gmail.com> | 2014-09-10 18:53:20 -0400 |
commit | 15564b81a37e097b52d1751b99dc91d36d37d66e (patch) | |
tree | 521a1949a89e55e6dbfb0dd7080e5bcdab1aac95 /include | |
parent | 4316d2c40585e3d0dcdb25fa6f2341531025e20e (diff) | |
parent | 7a4c914d05cab81ca55ac3cde478997c6d32477e (diff) | |
download | qtlocation-mapboxgl-15564b81a37e097b52d1751b99dc91d36d37d66e.tar.gz |
Merge branch 'fix-context-shutdown-merge' into libuv-0.10-fix-context-shutdown
Conflicts:
src/map/map.cpp
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/map/map.hpp | 3 | ||||
-rw-r--r-- | include/mbgl/map/view.hpp | 4 | ||||
-rw-r--r-- | include/mbgl/renderer/painter.hpp | 2 |
3 files changed, 9 insertions, 0 deletions
diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp index 4c5952a2c1..ac33dba0ef 100644 --- a/include/mbgl/map/map.hpp +++ b/include/mbgl/map/map.hpp @@ -53,6 +53,9 @@ public: // Triggers a cleanup that releases resources. void cleanup(); + // Releases resources immediately + void terminate(); + // Controls buffer swapping. bool needsSwap(); void swapped(); diff --git a/include/mbgl/map/view.hpp b/include/mbgl/map/view.hpp index 92d60d4d02..3e2f1a4b5a 100644 --- a/include/mbgl/map/view.hpp +++ b/include/mbgl/map/view.hpp @@ -35,6 +35,10 @@ public: // renderer setup since the render thread doesn't switch the contexts. virtual void make_active() = 0; + // Called from the render thread. Makes the GL context inactive in the current + // thread. This is called once just before the rendering thread terminates. + virtual void make_inactive() = 0; + // Returns the base framebuffer object, if any, and 0 if using the system // provided framebuffer. virtual unsigned int root_fbo() { diff --git a/include/mbgl/renderer/painter.hpp b/include/mbgl/renderer/painter.hpp index 75529d1136..15331b9b67 100644 --- a/include/mbgl/renderer/painter.hpp +++ b/include/mbgl/renderer/painter.hpp @@ -63,6 +63,7 @@ public: // lazy initialization) in case rendering continues. void cleanup(); + void terminate(); // Renders the backdrop of the OpenGL view. This also paints in areas where we don't have any // tiles whatsoever. @@ -123,6 +124,7 @@ public: private: void setupShaders(); + void deleteShaders(); mat4 translatedMatrix(const mat4& matrix, const std::array<float, 2> &translation, const Tile::ID &id, TranslateAnchorType anchor); void prepareTile(const Tile& tile); |