#pragma once #include #include #include #include #include #include namespace mbgl { namespace gl { class Context; } // namespace gl class FrameHistory { public: FrameHistory(); void record(const TimePoint&, float zoom, const Duration&); bool needsAnimation(const Duration&) const; void bind(gl::Context&, uint32_t); void upload(gl::Context&, uint32_t); private: std::array changeTimes; std::array changeOpacities; const AlphaImage opacities{ { 256, 1 } }; int16_t previousZoomIndex = 0; TimePoint previousTime; TimePoint time; bool firstFrame = true; bool dirty = true; mbgl::optional texture; }; } // namespace mbgl