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

Re: [Public WebGL] double-buffering and back buffer preservation



On Nov 15, 2010, at 6:22 PM, Cedric Vivier wrote:

> On Tue, Nov 16, 2010 at 05:56, Vladimir Vukicevic <vladimir@mozilla.com> wrote:
>> 5) Like #1 (do nothing), but add a context attribute for the author to indicate whether readback from the window/canvas buffer will ever be done.  If it's set to true, then dimply disallow readPixels/toDataURL when framebuffer 0 is bound (or have them always return all black).
> 
> I really like (5).
> Sounds like an easy way for the browser to use performance tricks
> without making things more complex for the developers. I would in fact
> recommend this attribute to default to true so that performance is
> improved on most apps (not so many WebGL apps might require
> readPixels/toDataURL imho).
> Cool thing about it for instance is that the browser is then free to
> use ext_discard_framebuffer when available, which on mobile devices
> provides huge savings of memory bandwidth (eg. on iDevices you can
> easily get +20% (!) FPS just by one call).

But a context flag would incur the extra cost on iDevices for the entire lifetime of the context and you may only need to incur this cost occasionally (e.g., when taking a screen snapshot. That would always require lower performance on the iDevice just in case a screen snapshot is needed.

-----
~Chris
cmarrin@apple.com




-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email: