Closed Bug 826546 Opened 7 years ago Closed 7 years ago

Reftests might intermittently fail because the snapshot is taken before WebGL content presents

Categories

(Core :: Canvas: WebGL, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: jgilbert, Assigned: jgilbert)

References

Details

Attachments

(1 file, 2 obsolete files)

I have encountered intermittent oranges in Ru tests, and bug 820457 shows that sometimes tests are passing when we they usually fail.

This might be because reftests are snapshotted after calling the onLoad hook. Since we issue WebGL calls in onLoad, it may be possible for compositing to not get around to Presenting the finished WebGL buffer before the snapshot happens.
Attached patch patch (obsolete) — Splinter Review
This might help. I'm not real clear on the order of events, though. This should work as long as reftest snapshotting is queued directly after onLoad, before the next rAF.
Attachment #697731 - Flags: review?(bjacob)
Comment on attachment 697731 [details] [diff] [review]
patch

A better option would be to rAF the renderGL/renderBackup call, and then rAF the test completion after that.  Something like:

 function onLoad() {
   var canvas = document.getElementById("canvas");
   var gl = initGL(canvas);
   var rAF = window.requestAnimationFrame || window.mozRequestAnimationFrame;
 
   rAF(function() {
     if (gl)
       renderGL(gl);
     else
       renderBackup(canvas);

     rAF(function() {
       document.documentElement.removeAttribute("class");
     });
   });
 }
True, it's probably worth doing it that way.
Attachment #697731 - Attachment is obsolete: true
Attachment #697731 - Flags: review?(bjacob)
Attached patch patch 2 (obsolete) — Splinter Review
With rAF for rendering and reftest readying.
Attachment #698118 - Flags: review?(vladimir)
Attached patch patch 3Splinter Review
That's what I get for not testing first. Had a c&p error.
Attachment #698118 - Attachment is obsolete: true
Attachment #698118 - Flags: review?(vladimir)
Attachment #698122 - Flags: review?(vladimir)
https://hg.mozilla.org/mozilla-central/rev/9038e0975bdc
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Blocks: 820457
You need to log in before you can comment on or make changes to this bug.