On 02/06/2012 06:15, Benoit Jacob wrote:
Clearing the drawing buffer is correct. Requesting a re-composite is
incorrect since the buffer has not been modified by the application.
In the sample I clear the drawing buffer to green.
Then 1 second later I issue some GL commands to see what
happens. These 6 commands should not effect what is
var p =
What I find is Firefox ends up
reflecting that the backbuffer has been cleared if I
call gl.readPixels. On other words it recomposites the
page with the cleared drawing buffer. As far as I can
tell from the spec that's a bug. The drawing buffer has
not been modified so it should not be composited again.
In Mozilla's implementation, readPixel checks if the
backbuffer needs a clear (which is the case if
preserveDrawingBuffer is false and the drawing buffer hasn't
been cleared since it was last presented). If it does find
that it needs a clear, then it clears it and requests it to
be composited again.
How else should it behave?