// Window background;
Window CompositorWindow;
XVisualInfo* windowVis;
+ float m_fpsinterval;
pthread_mutex_t run_lock;
pthread_mutex_t init_lock;
pthread_cond_t init_condition;
virtual bool initXServer();
virtual void RedrawAllLayers(bool clear, bool swap);
virtual void renderHWLayer(Layer* layer);
-
+ virtual void calculateFps();
+ virtual void calculateSurfaceFps(Surface *currentSurface, float time) ;
private:
void cleanup();
void Screenshot();
bool CreatePixmapsForAllWindows();
bool CreateCompositorWindow();
void UnredirectSpecialWIndows(Window w);
- void calculateFps();
- void calculateSurfaceFps(Surface *currentSurface, float time) ;
+
void printDebug();
void* EventLoop();
static int error(Display *dpy, XErrorEvent *ev);
void ManageXInputEvent(InputDevice type, InputEventState state, XEvent *pevent);
-
static bool m_xerror;
, windowHeight(height)
, CompositorWindow(0)
, windowVis(0)
+, m_fpsinterval(10.0f)
, run_lock()
, graphicSystem(0)
{
gettimeofday(&tv, NULL);
timeSinceLastCalc = (float)(tv.tv_sec-tv0.tv_sec) + 0.000001*((float)(tv.tv_usec-tv0.tv_usec));
- if (timeSinceLastCalc > 10.0f)
+ if (timeSinceLastCalc > m_fpsinterval)
{
FPS = ((float)(Frame)) / timeSinceLastCalc;
char floatStringBuffer[256];