broadway: double buffer window updates

Ensure that we're writing all the updates for a single rendering op
in one go without callbacks inbetween. That way some rendering will
be delayed, but the user will never see partial renderings.
This commit is contained in:
Alexander Larsson
2011-03-15 09:50:07 +01:00
parent 58c234e7d0
commit e3a2176a1f
4 changed files with 108 additions and 51 deletions

View File

@ -1088,6 +1088,21 @@ broadway_output_put_rgba (BroadwayOutput *output, int id, int x, int y,
free (rects);
}
void
broadway_output_surface_flush (BroadwayOutput *output,
int id)
{
char buf[HEADER_LEN + 3];
int p;
p = write_header (output, buf, 'f');
append_uint16 (id, buf, &p);
assert (p == sizeof (buf));
broadway_output_write (output, buf, sizeof (buf));
}
#if 0
static void
send_image_a (BroadwayOutput *output, int id, int x, int y,