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

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: protected destructor 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
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..09c88bda53c15469a33b761c84fe0af13477c62a 100644
--- a/content/common/gpu/gpu_command_buffer_stub.h
+++ b/content/common/gpu/gpu_command_buffer_stub.h
@@ -167,6 +167,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 +209,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,6 +263,9 @@ 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);
};

Powered by Google App Engine
This is Rietveld 408576698