// // Copyright 2002 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. //
Sync::Sync(rx::EGLImplFactory *factory, EGLenum type, const AttributeMap &attribs)
: mLabel(nullptr),
mType(type),
mCondition(EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR),
mNativeFenceFD(
attribs.getAsInt(EGL_SYNC_NATIVE_FENCE_FD_ANDROID, EGL_NO_NATIVE_FENCE_FD_ANDROID))
{ switch (type)
{ case EGL_SYNC_FENCE: case EGL_SYNC_NATIVE_FENCE_ANDROID: case EGL_SYNC_METAL_SHARED_EVENT_ANGLE:
mFence = std::unique_ptr<rx::EGLSyncImpl>(factory->createSync(attribs)); break;
case EGL_SYNC_REUSABLE_KHR:
mFence = std::unique_ptr<rx::EGLSyncImpl>(new rx::ReusableSync(attribs)); break;
default:
UNREACHABLE();
}
// Per extension spec: Signaling Condition. // "If the EGL_SYNC_NATIVE_FENCE_FD_ANDROID attribute is not // EGL_NO_NATIVE_FENCE_FD_ANDROID then the EGL_SYNC_CONDITION_KHR attribute // is set to EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID and the EGL_SYNC_STATUS_KHR // attribute is set to reflect the signal status of the native fence object. if ((mType == EGL_SYNC_NATIVE_FENCE_ANDROID) &&
(mNativeFenceFD != EGL_NO_NATIVE_FENCE_FD_ANDROID))
{
mCondition = EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID;
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.