diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-05-27 18:33:32 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-06-01 13:53:39 +0300 |
commit | 1b0683b94c070d14bc9f2cf357e551cdbbf3043a (patch) | |
tree | ef8557e284a9a0edb860a49ce3565b7bf622de2d /src/mbgl/geometry/line_atlas.hpp | |
parent | 2038a21cb5d67890acafbd34bc55e365ed0043fe (diff) | |
download | qtlocation-mapboxgl-1b0683b94c070d14bc9f2cf357e551cdbbf3043a.tar.gz |
[core] Use unique_resource for GL objects
Source: https://github.com/okdshin/unique_resource
These replace the complexity of manually handling moveable-RAII objects
with a type specific for that purpose.
As suggested in https://github.com/mapbox/mapbox-gl-native/pull/5141#issuecomment-221719872.
Diffstat (limited to 'src/mbgl/geometry/line_atlas.hpp')
-rw-r--r-- | src/mbgl/geometry/line_atlas.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mbgl/geometry/line_atlas.hpp b/src/mbgl/geometry/line_atlas.hpp index 8cff19eacf..0ca5e95a23 100644 --- a/src/mbgl/geometry/line_atlas.hpp +++ b/src/mbgl/geometry/line_atlas.hpp @@ -2,6 +2,7 @@ #include <mbgl/gl/gl.hpp> #include <mbgl/gl/object_store.hpp> +#include <mbgl/util/optional.hpp> #include <vector> #include <map> @@ -35,7 +36,7 @@ public: private: const std::unique_ptr<GLbyte[]> data; bool dirty; - gl::TextureHolder texture; + mbgl::optional<gl::UniqueTexture> texture; int nextRow = 0; std::map<size_t, LinePatternPos> positions; }; |