diff options
author | Michal Klocek <michal.klocek@qt.io> | 2017-09-21 11:39:17 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-08-02 20:52:21 +0000 |
commit | 3ee51f8f085da394851857b0d6a42df537ca99da (patch) | |
tree | 9c4e81cd778caeedbb45c075301cb8dc0506b948 /src/core/delegated_frame_node.cpp | |
parent | 20abae270a20d312d45fc7f850af44603f5f38de (diff) |
Use ozone for x11
Switch to use ozone also for x11/glx. This way we have a
more elegant approach to hook in our gl surface classes
and we use ozone for all linux qpa backends. Moreover,
we have now also more fine grain control to reimplement
gl surface handling logic.
This also aims to fix currently broken wayland backend,
but instead of patching the broken x11 calls, we simply reuse
ozone which does not use x11 for ozone egl.
Add webengine-x11 check to handle ozone glx plugin compilation.
For ozone egl backend reimplement missing functions.
Task-number: QTBUG-65682
Task-number: QTBUG-51631
Change-Id: I8b45c6f4d09a1c703efb12b6452d78ab385371ab
Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Diffstat (limited to 'src/core/delegated_frame_node.cpp')
-rw-r--r-- | src/core/delegated_frame_node.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/delegated_frame_node.cpp b/src/core/delegated_frame_node.cpp index 5b0983924..5257602cf 100644 --- a/src/core/delegated_frame_node.cpp +++ b/src/core/delegated_frame_node.cpp @@ -140,7 +140,7 @@ private: QSize m_textureSize; bool m_hasAlpha; GLenum m_target; -#if defined(USE_X11) +#if defined(USE_OZONE) bool m_ownsTexture; #endif #ifdef Q_OS_QNX @@ -571,7 +571,7 @@ MailboxTexture::MailboxTexture(const gpu::MailboxHolder &mailboxHolder, const QS , m_textureSize(textureSize) , m_hasAlpha(false) , m_target(GL_TEXTURE_2D) -#if defined(USE_X11) +#if defined(USE_OZONE) , m_ownsTexture(false) #endif { @@ -586,7 +586,7 @@ MailboxTexture::MailboxTexture(const gpu::MailboxHolder &mailboxHolder, const QS MailboxTexture::~MailboxTexture() { -#if defined(USE_X11) +#if defined(USE_OZONE) // This is rare case, where context is not shared // we created extra texture in current context, so // delete it now @@ -708,12 +708,12 @@ RectClipNode::RectClipNode(const QRectF &rect) DelegatedFrameNode::DelegatedFrameNode() : m_numPendingSyncPoints(0) -#if defined(USE_X11) && !defined(QT_NO_OPENGL) +#if defined(USE_OZONE) && !defined(QT_NO_OPENGL) , m_contextShared(true) #endif { setFlag(UsePreprocess); -#if defined(USE_X11) && !defined(QT_NO_OPENGL) +#if defined(USE_OZONE) && !defined(QT_NO_OPENGL) QOpenGLContext *currentContext = QOpenGLContext::currentContext() ; QOpenGLContext *sharedContext = qt_gl_global_share_context(); if (currentContext && sharedContext && !QOpenGLContext::areSharing(currentContext, sharedContext)) { @@ -1294,7 +1294,7 @@ void DelegatedFrameNode::fetchAndSyncMailboxes(QList<MailboxTexture *> &mailboxe deleteChromiumSync(&sync); } -#if defined(USE_X11) +#if defined(USE_OZONE) // Workaround when context is not shared QTBUG-48969 // Make slow copy between two contexts. if (!m_contextShared) { |