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

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

Issue 215803002: Remove CommandBuffer::GetTransferBuffer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 9 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 | « gpu/command_buffer/common/command_buffer_mock.h ('k') | gpu/command_buffer/service/gpu_scheduler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 15c38dd4b5a28882f3bd1ba74d05cedfaf86370d..c3c67d94e62637b38591bd4fbadd220fef013977 100644
--- a/gpu/command_buffer/service/command_buffer_service.h
+++ b/gpu/command_buffer/service/command_buffer_service.h
@@ -14,9 +14,30 @@ namespace gpu {
class TransferBufferManagerInterface;
+class GPU_EXPORT CommandBufferServiceBase : public CommandBuffer {
+ public:
+ // Sets the current get offset. This can be called from any thread.
+ virtual void SetGetOffset(int32 get_offset) = 0;
+
+ // Get the transfer buffer associated with an ID. Returns a null buffer for
+ // ID 0.
+ virtual scoped_refptr<gpu::Buffer> GetTransferBuffer(int32 id) = 0;
+
+ // Allows the reader to update the current token value.
+ virtual void SetToken(int32 token) = 0;
+
+ // Allows the reader to set the current parse error.
+ virtual void SetParseError(error::Error) = 0;
+
+ // Allows the reader to set the current context lost reason.
+ // NOTE: if calling this in conjunction with SetParseError,
+ // call this first.
+ virtual void SetContextLostReason(error::ContextLostReason) = 0;
+};
+
// An object that implements a shared memory command buffer and a synchronous
// API to manage the put and get pointers.
-class GPU_EXPORT CommandBufferService : public CommandBuffer {
+class GPU_EXPORT CommandBufferService : public CommandBufferServiceBase {
public:
typedef base::Callback<bool(int32)> GetBufferChangedCallback;
explicit CommandBufferService(
@@ -32,10 +53,12 @@ class GPU_EXPORT CommandBufferService : public CommandBuffer {
virtual void WaitForTokenInRange(int32 start, int32 end) OVERRIDE;
virtual void WaitForGetOffsetInRange(int32 start, int32 end) OVERRIDE;
virtual void SetGetBuffer(int32 transfer_buffer_id) OVERRIDE;
- virtual void SetGetOffset(int32 get_offset) OVERRIDE;
virtual scoped_refptr<Buffer> CreateTransferBuffer(size_t size,
int32* id) OVERRIDE;
virtual void DestroyTransferBuffer(int32 id) OVERRIDE;
+
+ // CommandBufferServiceBase implementation:
+ virtual void SetGetOffset(int32 get_offset) OVERRIDE;
virtual scoped_refptr<Buffer> GetTransferBuffer(int32 id) OVERRIDE;
virtual void SetToken(int32 token) OVERRIDE;
virtual void SetParseError(error::Error error) OVERRIDE;
« no previous file with comments | « gpu/command_buffer/common/command_buffer_mock.h ('k') | gpu/command_buffer/service/gpu_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698