]> git.tdb.fi Git - gldbg.git/blobdiff - flavors/gl/source/profiler.h
Fix several problems reported by valgrind
[gldbg.git] / flavors / gl / source / profiler.h
index 4d5c5a834641300fe247730ca94dd3f1c3f7a79d..7605fbcadc8e74fbf1e7067dea56a33926d6968f 100644 (file)
@@ -1,23 +1,17 @@
-/* $Id$
-
-This file is part of gldbg
-Copyright © 2010  Mikko Rasa, Mikkosoft Productions
-Distributed under the GPL
-*/
-
 #ifndef PROFILER_H_
 #define PROFILER_H_
 
-#include <msp/time/timestamp.h>
 #include "gldecoder.h"
 #include "tool.h"
 
 class Profiler: public RegisteredTool<Profiler>
 {
 private:
+       typedef unsigned Time;
+
        GlDecoder *decoder;
        bool enabled;
-       Msp::Time::TimeStamp start;
+       Time start;
        unsigned frames;
        unsigned draw_calls;
        unsigned vertices;
@@ -25,6 +19,7 @@ private:
 
 public:
        Profiler(GlDbg &);
+       ~Profiler();
 
        virtual void decode(const char *, unsigned);
 private:
@@ -34,6 +29,8 @@ private:
        static void glDrawElements(void *, GLenum, int, GLenum, const void *);
        static void glDrawRangeElements(void *, GLenum, unsigned, unsigned, int, GLenum, const void *);
        static void glXSwapBuffers(void *, Display *, GLXDrawable);
+
+       static Time get_time();
 };
 
 #endif