From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- gfx/angle/checkout/src/libANGLE/Semaphore.cpp | 52 +++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 gfx/angle/checkout/src/libANGLE/Semaphore.cpp (limited to 'gfx/angle/checkout/src/libANGLE/Semaphore.cpp') diff --git a/gfx/angle/checkout/src/libANGLE/Semaphore.cpp b/gfx/angle/checkout/src/libANGLE/Semaphore.cpp new file mode 100644 index 0000000000..45621653e3 --- /dev/null +++ b/gfx/angle/checkout/src/libANGLE/Semaphore.cpp @@ -0,0 +1,52 @@ +// +// Copyright 2019 The ANGLE Project Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// +// Semaphore.h: Implements the gl::Semaphore class [EXT_external_objects] + +#include "libANGLE/Semaphore.h" + +#include "common/angleutils.h" +#include "libANGLE/renderer/GLImplFactory.h" +#include "libANGLE/renderer/SemaphoreImpl.h" + +namespace gl +{ + +Semaphore::Semaphore(rx::GLImplFactory *factory, SemaphoreID id) + : RefCountObject(factory->generateSerial(), id), mImplementation(factory->createSemaphore()) +{} + +Semaphore::~Semaphore() {} + +void Semaphore::onDestroy(const Context *context) +{ + mImplementation->onDestroy(context); +} + +angle::Result Semaphore::importFd(Context *context, HandleType handleType, GLint fd) +{ + return mImplementation->importFd(context, handleType, fd); +} + +angle::Result Semaphore::importZirconHandle(Context *context, HandleType handleType, GLuint handle) +{ + return mImplementation->importZirconHandle(context, handleType, handle); +} + +angle::Result Semaphore::wait(Context *context, + const BufferBarrierVector &bufferBarriers, + const TextureBarrierVector &textureBarriers) +{ + return mImplementation->wait(context, bufferBarriers, textureBarriers); +} + +angle::Result Semaphore::signal(Context *context, + const BufferBarrierVector &bufferBarriers, + const TextureBarrierVector &textureBarriers) +{ + return mImplementation->signal(context, bufferBarriers, textureBarriers); +} + +} // namespace gl -- cgit v1.2.3