#include "render_device.hpp"

Render_device::Render_device()
  : drawing(false), new_to_draw(false)
{
  conf = Config::get_instance();
}

void Render_device::wait_for_output_done()
{
  output_done.wait();
  output_done.reset();
  new_to_draw = true;
}

void Render_device::output_is_ready()
{
  output_ready.signal();
}

void Render_device::wait_for_not_drawing()
{
  while (drawing || new_to_draw)
    usleep(100*1000);
}

