Closed Bug 1780792 Opened 3 years ago Closed 2 years ago

Various WebGPU buffer code cleanups

Categories

(Core :: Graphics: WebGPU, task)

task

Tracking

()

RESOLVED FIXED
105 Branch
Tracking Status
firefox105 --- fixed

People

(Reporter: nical, Assigned: nical)

References

Details

Attachments

(6 files, 1 obsolete file)

A collection of simple cleanup changes that came up during the work on bug 1777535 and its review.

Assignee: nobody → nical.bugzilla
Severity: -- → N/A
Type: defect → task

No funcitonal change here, I like to have the code maintaining and depending on the same invariants to be in the same place.

Depends on D151616

It is not used anywhere.

Depends on D151629

Another cosmetic change. I've dabbled with IPDL actors too much to not think about WebGPUParent when reading "mParent". Also the parent-child relationship between Device and Buffer is not very obvious to me (nor is it part of the specification).
So I find that wrapping mParent in a GetDevice method to make the code easier to understand. It also makes it explicit that the parent pointer cannot be null.

Depends on D151630

Having the code in the same place makes it easier to follow. This made me realize that the validation of aMode in mapAsync has to move to the device side (fix coming in a followup).

Depends on D151631

Attachment #9286647 - Attachment is obsolete: true
Pushed by nsilva@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4c512a0c05a9 Move the buffer creation code in Buffer.cpp. r=jimb https://hg.mozilla.org/integration/autoland/rev/6178c6dd5c31 Remove Buffer::Mappable(). r=jimb https://hg.mozilla.org/integration/autoland/rev/326511661875 use Buffer::GetDevice instead of mParent. r=jimb https://hg.mozilla.org/integration/autoland/rev/b4210142bf82 Move the remaining buffer logic in Device.cpp into Buffer.cpp. r=jimb https://hg.mozilla.org/integration/autoland/rev/6de84921e7d0 Remove the public/private/public sandwich in Buffer.h. r=jimb https://hg.mozilla.org/integration/autoland/rev/84974dbb4d3f Remove unnecessary MapRequest constructor. r=jimb

Backed out 22 changesets (Bug 1780792, Bug 1778713, Bug 1771254, Bug 1777535) for causing bustages on WebGPUParent.h.
Backout link
Push with failures <--> BP-hybrid
Failure Log

Flags: needinfo?(nical.bugzilla)
Pushed by nsilva@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7e8821dd4f03 Move the buffer creation code in Buffer.cpp. r=jimb https://hg.mozilla.org/integration/autoland/rev/e2c974f3d477 Remove Buffer::Mappable(). r=jimb https://hg.mozilla.org/integration/autoland/rev/f611bfcfc02d use Buffer::GetDevice instead of mParent. r=jimb https://hg.mozilla.org/integration/autoland/rev/0204fff6c608 Move the remaining buffer logic in Device.cpp into Buffer.cpp. r=jimb https://hg.mozilla.org/integration/autoland/rev/6607756956f2 Remove the public/private/public sandwich in Buffer.h. r=jimb https://hg.mozilla.org/integration/autoland/rev/71079d2d9b1d Remove unnecessary MapRequest constructor. r=jimb
Flags: needinfo?(nical.bugzilla)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: