Hash :
d2a58f00
Author :
Date :
2022-09-08T14:19:21
EGL: Implement eglCopyMetalSharedEventANGLE Add eglCopyMetalSharedEventANGLE function to the ANGLE_metal_shared_event_sync extension. This brings the extension on par with the EGL_ANDROID_native_fence_sync extension. eglCopyMetalSharedEventANGLE allows for copying the Metal event object from EGLSync objects implemented by the ANGLE Metal renderer. This function follows Objective-C convention for "copy" methods and increases the retain count of the Metal event object. The EGL API user is thus responsible for ensuring to release the returned object to avoid memory leaks. Test: angle_end2end_tests --gtest_filter=EGLSyncTestMetalSharedEvent.* Bug: angleproject:7561 Change-Id: I8c35b559014b85cb8c6a0e76ac2ab7891eed5da0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3881423 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Quyen Le <lehoangquyen@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
//
// Copyright 2020 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.
//
// EGLSyncImpl.cpp: Implements the rx::EGLSyncImpl class.
#include "libANGLE/renderer/EGLReusableSync.h"
#include "angle_gl.h"
#include "common/utilities.h"
namespace rx
{
egl::Error EGLSyncImpl::signal(const egl::Display *display, const gl::Context *context, EGLint mode)
{
UNREACHABLE();
return egl::EglBadMatch();
}
egl::Error EGLSyncImpl::copyMetalSharedEventANGLE(const egl::Display *display,
void **eventOut) const
{
UNREACHABLE();
return egl::EglBadMatch();
}
egl::Error EGLSyncImpl::dupNativeFenceFD(const egl::Display *display, EGLint *fdOut) const
{
UNREACHABLE();
return egl::EglBadMatch();
}
} // namespace rx