mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-17 06:53:22 +09:00
[Fix] (MG_Impl, MG_State, MG_Backend, MG_Util): Do source audit by Codex.
This commit is contained in:
@@ -1139,6 +1139,21 @@ namespace MobileGL {
|
||||
return EGL_NO_SURFACE;
|
||||
}
|
||||
|
||||
Bool EGLContext::IsDoubleBufferedSurface(EGLSurfaceHandle surface) const {
|
||||
const std::lock_guard<std::recursive_mutex> lock(m_mutex);
|
||||
const auto* surfaceObject = TryGetSurface(surface);
|
||||
if (!surfaceObject) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (surfaceObject->RenderBuffer != EGL_BACK_BUFFER) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return surfaceObject->Type == SurfaceType::Window ||
|
||||
surfaceObject->Type == SurfaceType::PlatformWindow;
|
||||
}
|
||||
|
||||
EGLContext::EGLSyncHandle EGLContext::CreateSync(EGLDisplayHandle display, EGLenum type,
|
||||
const EGLAttrib* attribList) {
|
||||
const std::lock_guard<std::recursive_mutex> lock(m_mutex);
|
||||
|
||||
Reference in New Issue
Block a user