Last Comment Bug 677543 - Not clearing WebGL framebuffer in teapot demo
: Not clearing WebGL framebuffer in teapot demo
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Canvas: WebGL (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla10
Assigned To: Benoit Jacob [:bjacob] (mostly away)
:
: Milan Sreckovic [:milan]
Mentors:
Depends on: 622072
Blocks: webgl-conformance 689136
  Show dependency treegraph
 
Reported: 2011-08-09 07:52 PDT by Benoit Jacob [:bjacob] (mostly away)
Modified: 2011-11-01 07:37 PDT (History)
8 users (show)
khuey: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
WIP patch (22.37 KB, patch)
2011-10-27 14:54 PDT, Benoit Jacob [:bjacob] (mostly away)
no flags Details | Diff | Splinter Review
The I-wish-I-had-known-earlier patch (4.11 KB, patch)
2011-10-29 16:07 PDT, Benoit Jacob [:bjacob] (mostly away)
jgilbert: review+
Details | Diff | Splinter Review

Description Benoit Jacob [:bjacob] (mostly away) 2011-08-09 07:52:11 PDT
This sample is not clearing the buffer, it is being composited, FF is not clearing the buffer.

http://greggman.com/downloads/webgl-sdk/google/shiny-teapot/index-no-clear.html

In this demo, Firefox behaves as if preserveDrawingBuffer=true except that's not the case.

We need to refine the conformance test,
https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/conformance/buffer-preserve-test.html
as we currently pass it despite having this bug.
Comment 1 Benoit Jacob [:bjacob] (mostly away) 2011-10-03 20:16:01 PDT
So, the bug is two-fold.

1. We rely on the wrong idea that WebGLContext::GetCanvasLayer gets called everytime the canvas is composited. That's not the case. No such function exists. We need to add one, maybe call it Presented(). Patch coming.

2. Additionally, we were not properly handling early return paths in GetCanvasLayer. Addressing that alone (marking as presented at the beginning of GetCanvasLayer) already fixes bug 689136.
Comment 2 Benoit Jacob [:bjacob] (mostly away) 2011-10-06 13:49:25 PDT
Khronos bug with patch for buffer-preserve-test to catch this bug:
http://www.khronos.org/bugzilla/show_bug.cgi?id=539
Comment 3 Benoit Jacob [:bjacob] (mostly away) 2011-10-27 14:54:06 PDT
Created attachment 570098 [details] [diff] [review]
WIP patch
Comment 4 Benoit Jacob [:bjacob] (mostly away) 2011-10-29 16:07:28 PDT
Created attachment 570505 [details] [diff] [review]
The I-wish-I-had-known-earlier patch

This one works everywhere and is really minimal.

I wish I had known earlier about this DidTransaction callback thing.

It was introduced in a commit by Roc back in March, bug 622072,
http://hg.mozilla.org/mozilla-central/rev/69a9aa30f2eff07d0dbf973fd72931a50b3dbb83

Informing me of this would have spared me a lot of time!
Comment 5 Jeff Gilbert [:jgilbert] 2011-10-31 12:40:54 PDT
Comment on attachment 570505 [details] [diff] [review]
The I-wish-I-had-known-earlier patch

Review of attachment 570505 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good. You might add a comment to note that the function is called every time, so it's more clear why the code's here.
Comment 6 Benoit Jacob [:bjacob] (mostly away) 2011-10-31 14:16:42 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/48ec56f65cd2
Comment 7 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-11-01 07:37:56 PDT
https://hg.mozilla.org/mozilla-central/rev/48ec56f65cd2

Note You need to log in before you can comment on or make changes to this bug.