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

Unified Diff: content/common/gpu/client/command_buffer_proxy_impl.h

Issue 1331843005: Implemented new fence syncs which replaces the old sync points. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed memory leak Created 5 years, 3 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/client/command_buffer_proxy_impl.h
diff --git a/content/common/gpu/client/command_buffer_proxy_impl.h b/content/common/gpu/client/command_buffer_proxy_impl.h
index 978d255d06883c705e2234e4d48d0c5412b077dd..0c8bf97bf75602fd3efbde5e91ae9ca2f8dd2fec 100644
--- a/content/common/gpu/client/command_buffer_proxy_impl.h
+++ b/content/common/gpu/client/command_buffer_proxy_impl.h
@@ -123,6 +123,9 @@ class CommandBufferProxyImpl
bool IsGpuChannelLost() override;
gpu::CommandBufferNamespace GetNamespaceID() const override;
uint64_t GetCommandBufferID() const override;
+ uint64_t GenerateFenceSyncRelease() override;;
+ bool IsFenceSyncRelease(uint64_t release) override;
+ bool IsFenceSyncFlushed(uint64_t release) override;
bool ProduceFrontBuffer(const gpu::Mailbox& mailbox);
void SetContextLostCallback(const base::Closure& callback);
@@ -196,6 +199,9 @@ class CommandBufferProxyImpl
// Try to read an updated copy of the state from shared memory.
void TryUpdateState();
+ // Updates the highest verified release fence sync.
+ void UpdateVerifiedReleases(uint32_t verified_flush);
+
// The shared memory area used to update state.
gpu::CommandBufferSharedState* shared_state() const;
@@ -220,6 +226,18 @@ class CommandBufferProxyImpl
int32 last_put_offset_;
int32 last_barrier_put_offset_;
+ // Next generated fence sync.
+ uint64_t next_fence_sync_release_;
+
+ // Unverified flushed fence syncs with their corresponding flush id.
+ std::queue<std::pair<uint64_t, uint32_t>> flushed_release_flush_id_;
+
+ // Last flushed fence sync release, same as last item in queue if not empty.
+ uint64_t flushed_fence_sync_release_;
+
+ // Last verified fence sync.
+ uint64_t verified_fence_sync_release_;
+
base::Closure context_lost_callback_;
MemoryAllocationChangedCallback memory_allocation_changed_callback_;

Powered by Google App Engine
This is Rietveld 408576698