diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2016-10-27 13:01:31 -0700 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2016-11-01 18:41:52 +0100 |
commit | e4e9b3a2f062fe712e7e346718c039fe2778c638 (patch) | |
tree | fb6774dc6841b26c7033e7e2eb6cc2964643be95 /src/mbgl/renderer/frame_history.hpp | |
parent | ed155460d3ec3777bfd95ce3d40c809e583b07de (diff) | |
download | qtlocation-mapboxgl-e4e9b3a2f062fe712e7e346718c039fe2778c638.tar.gz |
[core] convert FrameHistory to use managed texture handling
Diffstat (limited to 'src/mbgl/renderer/frame_history.hpp')
-rw-r--r-- | src/mbgl/renderer/frame_history.hpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/mbgl/renderer/frame_history.hpp b/src/mbgl/renderer/frame_history.hpp index 063930af26..d8fd06d27b 100644 --- a/src/mbgl/renderer/frame_history.hpp +++ b/src/mbgl/renderer/frame_history.hpp @@ -3,8 +3,9 @@ #include <array> #include <mbgl/platform/platform.hpp> -#include <mbgl/gl/object.hpp> +#include <mbgl/gl/texture.hpp> #include <mbgl/util/chrono.hpp> +#include <mbgl/util/image.hpp> #include <mbgl/util/optional.hpp> namespace mbgl { @@ -23,20 +24,17 @@ public: void upload(gl::Context&, uint32_t); private: - const int width = 256; - const int height = 1; - std::array<TimePoint, 256> changeTimes; std::array<uint8_t, 256> changeOpacities; - std::array<uint8_t, 256> opacities; + const AlphaImage opacities{ { 256, 1 } }; int16_t previousZoomIndex = 0; TimePoint previousTime = TimePoint::min(); TimePoint time = TimePoint::min(); bool firstFrame = true; - bool changed = true; + bool dirty = true; - mbgl::optional<gl::UniqueTexture> texture; + mbgl::optional<gl::Texture> texture; }; } // namespace mbgl |