Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Unified Diff: gpu/command_buffer/service/mailbox_synchronizer.h

Issue 664803003: Update from chromium a8e7c94b1b79a0948d05a1fcfff53391d22ce37a (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/mailbox_synchronizer.h
diff --git a/gpu/command_buffer/service/mailbox_synchronizer.h b/gpu/command_buffer/service/mailbox_synchronizer.h
index a845963bbbf74c67c6f2b0198c4c2ec7719e6981..3ddb9d0f8026ab1bfff8c64a87fb5ff652c23bd0 100644
--- a/gpu/command_buffer/service/mailbox_synchronizer.h
+++ b/gpu/command_buffer/service/mailbox_synchronizer.h
@@ -8,6 +8,7 @@
#include "gpu/command_buffer/common/mailbox.h"
#include <map>
+#include <queue>
#include <set>
#include "base/memory/linked_ptr.h"
@@ -15,6 +16,10 @@
#include "gpu/command_buffer/service/texture_definition.h"
#include "gpu/gpu_export.h"
+namespace gfx {
+class GLFence;
+}
+
namespace gpu {
namespace gles2 {
@@ -34,8 +39,8 @@ class MailboxSynchronizer {
// Create a texture from a globally visible mailbox.
Texture* CreateTextureFromMailbox(unsigned target, const Mailbox& mailbox);
- void PushTextureUpdates(MailboxManager* manager);
- void PullTextureUpdates(MailboxManager* manager);
+ void PushTextureUpdates(MailboxManager* manager, uint32 sync_point);
+ void PullTextureUpdates(MailboxManager* manager, uint32 sync_point);
void TextureDeleted(Texture* texture);
@@ -85,6 +90,12 @@ class MailboxSynchronizer {
const TargetName& target_name,
TextureGroup* group);
void UpdateTextureLocked(Texture* texture, TextureVersion& texture_version);
+ void CreateFenceLocked(uint32 sync_point);
+ void AcquireFenceLocked(uint32 sync_point);
+
+ typedef std::map<uint32, linked_ptr<gfx::GLFence> > SyncPointToFenceMap;
+ SyncPointToFenceMap sync_point_to_fence_;
+ std::queue<SyncPointToFenceMap::iterator> sync_points_;
DISALLOW_COPY_AND_ASSIGN(MailboxSynchronizer);
};
« no previous file with comments | « gpu/command_buffer/service/mailbox_manager_unittest.cc ('k') | gpu/command_buffer/service/mailbox_synchronizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698