diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-01-26 10:51:22 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-03-07 17:09:00 +0000 |
commit | 56714be7d05afb94c63b658a4fdb2bedd1bee645 (patch) | |
tree | abd103a44bf0dd5ea9ce9731db417606a307da0e /src/core/delegated_frame_node.h | |
parent | 6ac33ac828b3a17cf7db7a80b3c043d51ba646a1 (diff) |
Update GL mailbox synchronization to Chromium 49v5.7.0-alpha1
Chromium 49 switched to using SyncToken, making our old model based on
sync-points obsolete. This patch rewrites our syncing to instead take
advantage of new Chromium API for waiting on sync tokens. It also
moves the creation of the GLFences we use out of Chromium.
Task-number: QTBUG-51173
Change-Id: I04d726d4bc81bf6b7fe39bb2b5507e84a0b6991e
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/core/delegated_frame_node.h')
-rw-r--r-- | src/core/delegated_frame_node.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/core/delegated_frame_node.h b/src/core/delegated_frame_node.h index 9c05cb872..8a37f6b4c 100644 --- a/src/core/delegated_frame_node.h +++ b/src/core/delegated_frame_node.h @@ -43,6 +43,8 @@ #include "base/memory/scoped_ptr.h" #include "cc/quads/render_pass.h" #include "cc/resources/transferable_resource.h" +#include "gpu/command_buffer/service/sync_point_manager.h" +#include "ui/gl/gl_fence.h" #include <QMutex> #include <QSGNode> #include <QSharedData> @@ -83,10 +85,11 @@ public: void commit(ChromiumCompositorData *chromiumCompositorData, cc::ReturnedResourceArray *resourcesToRelease, RenderWidgetHostViewQtDelegate *apiDelegate); private: + void fetchAndSyncMailboxes(QList<MailboxTexture *> &mailboxesToFetch); // Making those callbacks static bypasses base::Bind's ref-counting requirement // of the this pointer when the callback is a method. - static void fetchTexturesAndUnlockQt(DelegatedFrameNode *frameNode, QList<MailboxTexture *> *mailboxesToFetch); - static void syncPointRetired(DelegatedFrameNode *frameNode, QList<MailboxTexture *> *mailboxesToFetch); + static void pullTexture(DelegatedFrameNode *frameNode, MailboxTexture *mailbox); + static void fenceAndUnlockQt(DelegatedFrameNode *frameNode); ResourceHolder *findAndHoldResource(unsigned resourceId, QHash<unsigned, QSharedPointer<ResourceHolder> > &candidates); QSGTexture *initAndHoldTexture(ResourceHolder *resource, bool quadIsAllOpaque, RenderWidgetHostViewQtDelegate *apiDelegate = 0); @@ -98,9 +101,10 @@ private: QVector<QSharedPointer<QSGTexture> > textureStrongRefs; } m_sgObjects; int m_numPendingSyncPoints; - QMap<uint32, gfx::TransferableFence> m_mailboxGLFences; QWaitCondition m_mailboxesFetchedWaitCond; QMutex m_mutex; + QList<gfx::TransferableFence> m_textureFences; + scoped_ptr<gpu::SyncPointClient> m_syncPointClient; }; } // namespace QtWebEngineCore |