From c04dcc2e7d834218ef2d4194331e383402495ae1 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 10 Apr 2024 20:07:22 +0200 Subject: Adding upstream version 2:20.4+dfsg. Signed-off-by: Daniel Baumann --- .../android/WinSystemAndroidGLESContext.h | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 xbmc/windowing/android/WinSystemAndroidGLESContext.h (limited to 'xbmc/windowing/android/WinSystemAndroidGLESContext.h') diff --git a/xbmc/windowing/android/WinSystemAndroidGLESContext.h b/xbmc/windowing/android/WinSystemAndroidGLESContext.h new file mode 100644 index 0000000..b04ff41 --- /dev/null +++ b/xbmc/windowing/android/WinSystemAndroidGLESContext.h @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv + * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. + */ + +#pragma once + +#include "WinSystemAndroid.h" +#include "rendering/gles/RenderSystemGLES.h" +#include "utils/EGLUtils.h" +#include "utils/GlobalsHandling.h" + +struct AVMasteringDisplayMetadata; +struct AVContentLightMetadata; + +class CWinSystemAndroidGLESContext : public CWinSystemAndroid, public CRenderSystemGLES +{ +public: + CWinSystemAndroidGLESContext() = default; + ~CWinSystemAndroidGLESContext() override = default; + + static void Register(); + static std::unique_ptr CreateWinSystem(); + + // Implementation of CWinSystemBase via CWinSystemAndroid + CRenderSystemBase *GetRenderSystem() override { return this; } + bool InitWindowSystem() override; + bool CreateNewWindow(const std::string& name, + bool fullScreen, + RESOLUTION_INFO& res) override; + + bool ResizeWindow(int newWidth, int newHeight, int newLeft, int newTop) override; + bool SetFullScreen(bool fullScreen, RESOLUTION_INFO& res, bool blankOtherDisplays) override; + + std::unique_ptr GetVideoSync(void* clock) override; + + float GetFrameLatencyAdjustment() override; + bool IsHDRDisplay() override; + bool SetHDR(const VideoPicture* videoPicture) override; + + EGLDisplay GetEGLDisplay() const; + EGLSurface GetEGLSurface() const; + EGLContext GetEGLContext() const; + EGLConfig GetEGLConfig() const; +protected: + void SetVSyncImpl(bool enable) override; + void PresentRenderImpl(bool rendered) override; + +private: + bool CreateSurface(); + + CEGLContextUtils m_pGLContext; + bool m_hasHDRConfig = false; + + std::unique_ptr m_displayMetadata; + std::unique_ptr m_lightMetadata; + EGLint m_HDRColorSpace = EGL_NONE; + bool m_hasEGL_ST2086_Extension = false; + bool m_hasEGL_BT2020_PQ_Colorspace_Extension = false; +}; -- cgit v1.2.3