Closed Bug 1422040 Opened 7 years ago Closed 6 years ago

Add the ability to use ipc::ByteBuf for blob image transfer

Categories

(Core :: Graphics: WebRender, enhancement, P2)

enhancement

Tracking

()

RESOLVED WONTFIX

People

(Reporter: jrmuizel, Assigned: nical)

References

(Blocks 1 open bug)

Details

(Whiteboard: [wr-reserve])

This will let us avoid bug 1405824 and might be fast enough that we don't need to worry about not using shared memory for now.
Assignee: nobody → nical.bugzilla
Whiteboard: [wr-mvp] [triage]
In this profile https://perfht.ml/2ApmBjH shared memory allocation is taking up at least 10% of webrender display list creation time
Blocks: 1422039
Status: NEW → ASSIGNED
Priority: -- → P1
Whiteboard: [wr-mvp] [triage] → [wr-mvp]
I might have let out that this was straight forward during yesterday's meeting but in fact IPDL still can't handle move-only types unless they are passed directly as a parameter of the message (so no way to pass it in an ipdl union or struct, which we can't do without in any reasonable way here). So I am this close to go face the undefined behavior dragons by having ByteBuffer fake a copy constructor that const_casts the source and nulls out the buffer (making it equivalent to a move).
Hm, nevermind, this code in the ipdl compiler: > def _cxxTypeNeedsMove(ipdltype): > return ipdltype.isIPDL() and (ipdltype.isArray() or > ipdltype.isShmem() or > ipdltype.isByteBuf() or > ipdltype.isEndpoint()) Refers to ByteBuf which is not ByteBuffer.
After a bit more than a day of refactoring and going through compile errors, the current status is: - IPDL doesn't support move-only types in structures and enum (only directly as message arguments) - IPDL doesn't support serializing nsTArrays of move-only types either due to the array being passed as a const reference while serializing (see generated PFoo::Write(const nsTarray<ByteBuf>&, Message*)) which requires the ParamTrait::Write to be const (which we explicitly don't want here).
Whiteboard: [wr-mvp] → [wr-reserve]
This got replaced by bug 1405824 (for now) due to IPDL's allergy to non-copyable types.
Priority: P1 → P3
No longer blocks: stage-wr-nightly
I don't plan to work on this any time soon and bug 1405824 was fixed some other way so closing.
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
No longer blocks: 1422039
You need to log in before you can comment on or make changes to this bug.