[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] CORS and resource provider awareness

On Wed, Oct 31, 2012 at 5:11 AM, Mark Callow <callow.mark@artspark.co.jp> wrote:

As Ken notes in his later message, this is not the approach being considered by CSS shaders. I want to point out that, even if preventing timing of drawing was the approach, there would be no need to delay returns from drawArrays/Elements. They return essentially immediately and provide no useful information about rendering time; its the pipeline in action.

What would need to be done is to disable finish() and have the browser call requestAnimationFrame at regular intervals, e.g. at screen refresh. Unfortunately if some rendering takes more than the screen refresh interval, eventually something eventually has to give and at some point requestAnimationFrame will not  be called on schedule. This permits a very coarse level of measurement such as whether the texture contains a pixel of a particular color. However these steps would prevent the Context exploit.

Finish is an artificial synchronization primitive which can be substituted by any of the natural synchronization primitives (bufferData, texImage2D, etc.). It is possible to build code that won't work without explicit finish.