14QOhosEGLPlatformContext::QOhosEGLPlatformContext(
const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display)
15 : QEGLPlatformContext(format, share, display,
nullptr)
16 , m_isDuringSwappingBuffers(
false)
20void QOhosEGLPlatformContext::swapBuffers(QPlatformSurface *surface)
22 m_isDuringSwappingBuffers =
true;
23 QEGLPlatformContext::swapBuffers(surface);
24 m_isDuringSwappingBuffers =
false;
27 auto *ohosView = ohosWindow !=
nullptr
28 ? ohosWindow->ownedViewOrNull()
30 if (ohosView !=
nullptr)
31 ohosView->handleSurfaceContentsUpdated();
34EGLSurface QOhosEGLPlatformContext::eglSurfaceForPlatformSurface(QPlatformSurface *surface)
36 if (surface->surface()->surfaceClass() != QSurface::Window)
37 return static_cast<QEGLPbuffer *>(surface)->pbuffer();
40 auto *ohosWindowSurface = ohosWindow->ownedSurfaceOrNull();
42 return ohosWindowSurface !=
nullptr
43 ? ohosWindowSurface->tryGetOrCreateEGLWindowSurface(
44 eglDisplay(), eglConfig(), m_isDuringSwappingBuffers)