summaryrefslogtreecommitdiffstats
path: root/dom/webgpu/CommandBuffer.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
commit086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch)
treea4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /dom/webgpu/CommandBuffer.cpp
parentAdding debian version 124.0.1-1. (diff)
downloadfirefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz
firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/webgpu/CommandBuffer.cpp')
-rw-r--r--dom/webgpu/CommandBuffer.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/dom/webgpu/CommandBuffer.cpp b/dom/webgpu/CommandBuffer.cpp
index ff9bbd8d5d..59023018ef 100644
--- a/dom/webgpu/CommandBuffer.cpp
+++ b/dom/webgpu/CommandBuffer.cpp
@@ -16,10 +16,13 @@ namespace mozilla::webgpu {
GPU_IMPL_CYCLE_COLLECTION(CommandBuffer, mParent)
GPU_IMPL_JS_WRAP(CommandBuffer)
-CommandBuffer::CommandBuffer(Device* const aParent, RawId aId,
- nsTArray<WeakPtr<CanvasContext>>&& aTargetContexts,
- RefPtr<CommandEncoder>&& aEncoder)
- : ChildOf(aParent), mId(aId), mTargetContexts(std::move(aTargetContexts)) {
+CommandBuffer::CommandBuffer(
+ Device* const aParent, RawId aId,
+ nsTArray<WeakPtr<CanvasContext>>&& aPresentationContexts,
+ RefPtr<CommandEncoder>&& aEncoder)
+ : ChildOf(aParent),
+ mId(aId),
+ mPresentationContexts(std::move(aPresentationContexts)) {
mEncoder = std::move(aEncoder);
MOZ_RELEASE_ASSERT(aId);
}
@@ -33,9 +36,9 @@ Maybe<RawId> CommandBuffer::Commit() {
return Nothing();
}
mValid = false;
- for (const auto& targetContext : mTargetContexts) {
- if (targetContext) {
- targetContext->MaybeQueueSwapChainPresent();
+ for (const auto& presentationContext : mPresentationContexts) {
+ if (presentationContext) {
+ presentationContext->MaybeQueueSwapChainPresent();
}
}
return Some(mId);