зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1754302 - WebGPU should consistently use GetCurrentSerialEventTarget instead of GetMainThreadSerialEventTarget. r=kvark
This is necessary for when WebGPU objects are accessed from a worker thread instead of the main thread. It should be otherwise a non-functional change. Differential Revision: https://phabricator.services.mozilla.com/D138206
This commit is contained in:
Родитель
0745b128da
Коммит
8170056817
|
@ -114,7 +114,7 @@ already_AddRefed<dom::Promise> Buffer::MapAsync(
|
|||
}
|
||||
|
||||
mappingPromise->Then(
|
||||
GetMainThreadSerialEventTarget(), __func__,
|
||||
GetCurrentSerialEventTarget(), __func__,
|
||||
[promise, self](ipc::Shmem&& aShmem) {
|
||||
self->mMapped->mShmem = std::move(aShmem);
|
||||
promise->MaybeResolve(0);
|
||||
|
|
|
@ -247,7 +247,7 @@ already_AddRefed<dom::Promise> Device::CreateComputePipelineAsync(
|
|||
context->mParentId = mId;
|
||||
mBridge->DeviceCreateComputePipelineAsync(context.get(), aDesc)
|
||||
->Then(
|
||||
GetMainThreadSerialEventTarget(), __func__,
|
||||
GetCurrentSerialEventTarget(), __func__,
|
||||
[self = RefPtr{this}, context, promise](RawId aId) {
|
||||
RefPtr<ComputePipeline> object = new ComputePipeline(
|
||||
self, aId, context->mImplicitPipelineLayoutId,
|
||||
|
@ -274,7 +274,7 @@ already_AddRefed<dom::Promise> Device::CreateRenderPipelineAsync(
|
|||
context->mParentId = mId;
|
||||
mBridge->DeviceCreateRenderPipelineAsync(context.get(), aDesc)
|
||||
->Then(
|
||||
GetMainThreadSerialEventTarget(), __func__,
|
||||
GetCurrentSerialEventTarget(), __func__,
|
||||
[self = RefPtr{this}, context, promise](RawId aId) {
|
||||
RefPtr<RenderPipeline> object = new RenderPipeline(
|
||||
self, aId, context->mImplicitPipelineLayoutId,
|
||||
|
@ -351,7 +351,7 @@ already_AddRefed<dom::Promise> Device::PopErrorScope(ErrorResult& aRv) {
|
|||
auto errorPromise = mBridge->SendDevicePopErrorScope(mId);
|
||||
|
||||
errorPromise->Then(
|
||||
GetMainThreadSerialEventTarget(), __func__,
|
||||
GetCurrentSerialEventTarget(), __func__,
|
||||
[self = RefPtr{this}, promise](const MaybeScopedError& aMaybeError) {
|
||||
if (aMaybeError) {
|
||||
if (aMaybeError->operationError) {
|
||||
|
|
|
@ -60,7 +60,7 @@ already_AddRefed<dom::Promise> Instance::RequestAdapter(
|
|||
RefPtr<Instance> instance = this;
|
||||
|
||||
mBridge->InstanceRequestAdapter(aOptions)->Then(
|
||||
GetMainThreadSerialEventTarget(), __func__,
|
||||
GetCurrentSerialEventTarget(), __func__,
|
||||
[promise, instance](ipc::ByteBuf aInfoBuf) {
|
||||
ffi::WGPUAdapterInformation info = {};
|
||||
ffi::wgpu_client_adapter_extract_info(ToFFI(&aInfoBuf), &info);
|
||||
|
|
Загрузка…
Ссылка в новой задаче