2 * Copyright (C) 2017-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
11 #include "system_egl.h"
13 #include <EGL/eglext.h>
25 explicit CEGLFence(EGLDisplay display
);
26 CEGLFence(CEGLFence
const& other
) = delete;
27 CEGLFence
& operator=(CEGLFence
const& other
) = delete;
33 #if defined(EGL_ANDROID_native_fence_sync) && defined(EGL_KHR_fence_sync)
34 void CreateKMSFence(int fd
);
35 void CreateGPUFence();
42 EGLDisplay m_display
{nullptr};
43 EGLSyncKHR m_fence
{nullptr};
45 PFNEGLCREATESYNCKHRPROC m_eglCreateSyncKHR
{nullptr};
46 PFNEGLDESTROYSYNCKHRPROC m_eglDestroySyncKHR
{nullptr};
47 PFNEGLGETSYNCATTRIBKHRPROC m_eglGetSyncAttribKHR
{nullptr};
49 #if defined(EGL_ANDROID_native_fence_sync) && defined(EGL_KHR_fence_sync)
50 EGLSyncKHR
CreateFence(int fd
);
52 EGLSyncKHR m_gpuFence
{EGL_NO_SYNC_KHR
};
53 EGLSyncKHR m_kmsFence
{EGL_NO_SYNC_KHR
};
55 PFNEGLDUPNATIVEFENCEFDANDROIDPROC m_eglDupNativeFenceFDANDROID
{nullptr};
56 PFNEGLCLIENTWAITSYNCKHRPROC m_eglClientWaitSyncKHR
{nullptr};
57 PFNEGLWAITSYNCKHRPROC m_eglWaitSyncKHR
{nullptr};