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

Unified Diff: content/common/gpu/gpu_command_buffer_stub.h

Issue 10510013: GPU: Adding sync points for cross-channel synchronization (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments Created 8 years, 6 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
« no previous file with comments | « content/common/gpu/gpu_channel_manager.cc ('k') | content/common/gpu/gpu_command_buffer_stub.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/gpu_command_buffer_stub.h
diff --git a/content/common/gpu/gpu_command_buffer_stub.h b/content/common/gpu/gpu_command_buffer_stub.h
index 2c81c98ac6abed12d3ee487a700a633f719a07b5..ee4f463636c7a2e94efa9b5efd8c0bc4b5b49a35 100644
--- a/content/common/gpu/gpu_command_buffer_stub.h
+++ b/content/common/gpu/gpu_command_buffer_stub.h
@@ -6,8 +6,7 @@
#define CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_
#pragma once
-#if defined(ENABLE_GPU)
-
+#include <deque>
#include <string>
#include <vector>
@@ -167,6 +166,10 @@ class GpuCommandBufferStub
void AddDestructionObserver(DestructionObserver* observer);
void RemoveDestructionObserver(DestructionObserver* observer);
+ // Associates a sync point to this stub. When the stub is destroyed, it will
+ // retire all sync points that haven't been previously retired.
+ void AddSyncPoint(uint32 sync_point);
+
private:
void Destroy();
@@ -205,6 +208,10 @@ class GpuCommandBufferStub
void OnDiscardBackbuffer();
void OnEnsureBackbuffer();
+ void OnRetireSyncPoint(uint32 sync_point);
+ void OnWaitSyncPoint(uint32 sync_point);
+ void OnSyncPointRetired();
+
void OnSetClientHasMemoryAllocationChangedCallback(bool);
void OnReschedule();
@@ -255,9 +262,10 @@ class GpuCommandBufferStub
ObserverList<DestructionObserver> destruction_observers_;
+ // A queue of sync points associated with this stub.
+ std::deque<uint32> sync_points_;
+
DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub);
};
-#endif // defined(ENABLE_GPU)
-
#endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_
« no previous file with comments | « content/common/gpu/gpu_channel_manager.cc ('k') | content/common/gpu/gpu_command_buffer_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698