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

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

Issue 2550583002: gpu: Thread-safe command buffer state lookup. (Closed)
Patch Set: jbauman's review Created 4 years 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/command_buffer_service.h
diff --git a/gpu/command_buffer/service/command_buffer_service.h b/gpu/command_buffer/service/command_buffer_service.h
index 0d305bf2582e29740f3b72ccb2a2c7331bc65986..9e030db0456707554c7d5ea31ad5ca0d338082d9 100644
--- a/gpu/command_buffer/service/command_buffer_service.h
+++ b/gpu/command_buffer/service/command_buffer_service.h
@@ -24,6 +24,9 @@ class GPU_EXPORT CommandBufferServiceBase : public CommandBuffer {
// Sets the current get offset. This can be called from any thread.
virtual void SetGetOffset(int32_t get_offset) = 0;
+ // Set the release count for the last fence sync seen in the command stream.
+ virtual void SetReleaseCount(uint64_t release_count) = 0;
+
// Get the transfer buffer associated with an ID. Returns a null buffer for
// ID 0.
virtual scoped_refptr<gpu::Buffer> GetTransferBuffer(int32_t id) = 0;
@@ -54,17 +57,17 @@ class GPU_EXPORT CommandBufferService : public CommandBufferServiceBase {
// CommandBuffer implementation:
State GetLastState() override;
- int32_t GetLastToken() override;
void Flush(int32_t put_offset) override;
void OrderingBarrier(int32_t put_offset) override;
- void WaitForTokenInRange(int32_t start, int32_t end) override;
- void WaitForGetOffsetInRange(int32_t start, int32_t end) override;
+ State WaitForTokenInRange(int32_t start, int32_t end) override;
+ State WaitForGetOffsetInRange(int32_t start, int32_t end) override;
void SetGetBuffer(int32_t transfer_buffer_id) override;
scoped_refptr<Buffer> CreateTransferBuffer(size_t size, int32_t* id) override;
void DestroyTransferBuffer(int32_t id) override;
// CommandBufferServiceBase implementation:
void SetGetOffset(int32_t get_offset) override;
+ void SetReleaseCount(uint64_t release_count) override;
scoped_refptr<Buffer> GetTransferBuffer(int32_t id) override;
void SetToken(int32_t token) override;
void SetParseError(error::Error error) override;
@@ -110,6 +113,7 @@ class GPU_EXPORT CommandBufferService : public CommandBufferServiceBase {
base::Closure parse_error_callback_;
scoped_refptr<TransferBufferManagerInterface> transfer_buffer_manager_;
int32_t token_;
+ uint64_t release_count_;
uint32_t generation_;
error::Error error_;
error::ContextLostReason context_lost_reason_;
« no previous file with comments | « gpu/command_buffer/common/command_buffer_mock.h ('k') | gpu/command_buffer/service/command_buffer_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698