[cairo] [PATCH] [cairo-gl] Fix support for gl window surface resizes
Bill Spitzak
spitzak at gmail.com
Wed Jan 12 12:25:02 PST 2011
Andrea Canciani wrote:
> Maybe Bill can provide some additional details about what is the correct
> way to have a serial without the wraparound issue.
Not really, what I imagined is exactly what the first patch has.
Best idea I have for an "improvement" is an additional boolean along
with the serial number:
setsize(surface,...) {
if (surface->serial_looked_at) {
surface->serial++;
surface->serial_looked_at = false;
}
}
use(..., surface) {
if (this->last_serial != surface->serial) {
update_to(surface);
surface->serial_looked_at = true;
}
}
This would then only fail if there were exactly UINT_MAX-1 different
users of the surface and they all looked at it between two resizes. So
not perfect either...
Personally I don't think this is a problem as it is far too unlikely to
happen.
More information about the cairo
mailing list