Closed Bug 1617751 Opened 4 years ago Closed 4 years ago

Assertion failure calling gl->Screen()->Front()->ToSurfaceDescriptor() in WebGLContext::Present (on Android)

Categories

(Core :: Graphics: CanvasWebGL, defect)

All
Android
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: mortimergoro, Assigned: mortimergoro)

References

Details

Attachments

(1 file)

Assignee: nobody → imanol

The crash only happens with e10s disabled. After some research I was able to reproduce the issue using a minimal testcase:

  • If a canvas is sized using CSS styles the webgl test runs correctly
  • If a canvas is sized using JS (canvas.width = value) gl->Screen()->Front()->ToSurfaceDescriptor() crashes

The problem is related to backbuffer not being regenerated after the gl->Screen()->Morph(std::move(factory)) call. When using JS sized canvas the DrawingBufferSize and gl->Screen()->Size() are equal. This leads to Resize not being called in PresentScreenBuffer, which ends with a FrontBuffer which has not been created using the new factory after screen->PublishFrame();

Yep, that sounds like a problem.

What I'm thinking of doing is changing this API generally to be BlitToNewSharedSurface, instead of the current GLScreenBuffer dance.

Pushed by igorostizaga@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e3a8032a4a14
Ensure that GLScreenBuffer back buffer is created using the newly attached factory r=jgilbert
Regressions: 1618032
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
Status: RESOLVED → REOPENED
Flags: needinfo?(imanol)
Resolution: FIXED → ---
Target Milestone: mozilla75 → ---
Attachment #9128912 - Attachment description: Bug 1617751 - Ensure that GLScreenBuffer back buffer is created using the newly attached factory → Bug 1617751 - Ensure that GLScreenBuffer back buffer is created using the newly attached factory.
Pushed by igorostizaga@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8d3e96a5a07a
Ensure that GLScreenBuffer back buffer is created using the newly attached factory. r=jgilbert
Flags: needinfo?(imanol)
Status: REOPENED → RESOLVED
Closed: 4 years ago4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: