3 Copyright (C) 2010-2018 celeron55, Perttu Ahola <celeron55@gmail.com>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation; either version 2.1 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 #include <IVideoDriver.h>
29 /* Profiler display */
35 Piece(Profiler::GraphValues v) : values(std::move(v)) {}
36 Profiler::GraphValues values;
43 Meta(float initial = 0,
44 video::SColor color = video::SColor(255, 255, 255, 255)) :
46 max(initial), color(color)
50 std::deque<Piece> m_log;
53 u32 m_log_max_size = 200;
55 ProfilerGraph() = default;
57 void put(const Profiler::GraphValues &values);
59 void draw(s32 x_left, s32 y_bottom, video::IVideoDriver *driver,
60 gui::IGUIFont *font) const;