Closed Bug 1369677 Opened 2 years ago Closed 2 years ago

Handle the SHMEM map-failed with WR

Categories

(Core :: Graphics: WebRender, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: jerry, Assigned: jerry)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

Some canvas tests create a large shmem buffer and the parent side might not be able to map that large buffer.

The log will be:
###!!! [Parent][DispatchAsyncMessage] Error: SHMEM_CREATED_MESSAGE Payload error: message could not be deserialized
[GFX1-]: Failed to create a valid ShmemTextureHost

There is no problem for gecko with this situation. The gecko just skips the rendering call for that bad buffer. But with WR, we already put the display items at client side. We can't cancel the display item rendering at parent side. So, we will hit some crash when we try to map that bad-shmem during rendering.

I plan to skip the mapping call for the bad-shmem, and bypass the nullptr to WR. Then, provide a whole black buffer(rgba(0,0,0,0)) or a 0 gl handle in the wr-binding. We will see a black area for that bad-shmem display item.
Blocks: 1388995
MozReview-Commit-ID: Ghez1SJ6ghf
Attachment #8903095 - Flags: review?(nical.bugzilla)
Attachment #8903095 - Flags: review?(nical.bugzilla) → review+
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/3442318a1024
Handle RenderTexture lock() failed. r=nical
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/3442318a1024
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.