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