[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Public WebGL] preserveDrawingBuffer = false
- To: public webgl <public_webgl@khronos.org>
- Subject: [Public WebGL] preserveDrawingBuffer = false
- From: "Gregg Tavares (wrk)" <gman@google.com>
- Date: Tue, 19 Apr 2011 18:56:02 -0700
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1303264563; bh=HX5C9oDqdeGdpBNBgljxCHj8RpQ=; h=MIME-Version:Date:Message-ID:Subject:From:To:Content-Type; b=FIWiUd3uDtpjKFYMf6sYFBURoroEZRe28mhawSAjId9Tc1gjt4Ee1wftmdLTMP5y1 HXOUe171gdF4/ke8XA30A==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=xCKb7Ee+KL6ErD3Dj7vmwiL4FgZUzpEI/rAPTAVdrkc=; b=DewsIXsXDL/nFgHVaDaUwAWCXdEgDIktkrdu3Di23pSSXtppQGo8uvjm807m3qC0PX 5Z+bRclvaC9tvGMO+Ixg==
- Domainkey-signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:date:message-id:subject:from:to:content-type; b=NAdnGCFpFioRnRK8ma7fM426PvAGOvjQN0LZzOlKnSIL0AY5rpHB90QzYQL41oOOak Iwl0EOVhlUF6lcgeRSiA==
- List-id: Public WebGL Mailing List <public_webgl.khronos.org>
- Sender: owner-public_webgl@khronos.org
I'd like to suggest that the preserveDrawingBuffer = false spec be revisited.
The spec was written so that the drawing buffer is cleared if a compositing operation is done. This was done so that apps would not rely on the contents of the drawing buffer being preserved.
Unfortunately it has the opposite effect. Apps are now written to expect the drawing buffer to be cleared. But, the spec does not actually require the drawing buffer to be cleared unless the buffer is composited.
So, we have the same situation. Apps expect the drawing buffer to be cleared but depending on the browser, timing, etc there is no guarantee that the buffer was actually composited. If it wasn't the contents is still there. You write some code, it seems to work and only later do you find out that on some slow machine or some specific browser on a specific platform you're getting inconsistent behavior and tracking that down can be really hard (I just got through tracking it down for one app)
Would it be possible to change the spec to effectively say
If preserveDrawingBuffer is false, then when _javascript_ enters a callback if the user does not clear the drawingbuffer before the first draw call the implementation will clear it?
This doesn't seem like it would change any of the performance issues nor the effective semantics of the spec but it would make the behavior 100% consistent.