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

Side by Side Diff: gpu/command_buffer/service/command_buffer_service.h

Issue 663363002: Standardize usage of virtual/override/final in gpu/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update generator script Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GPU_COMMAND_BUFFER_SERVICE_COMMAND_BUFFER_SERVICE_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_COMMAND_BUFFER_SERVICE_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_COMMAND_BUFFER_SERVICE_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_COMMAND_BUFFER_SERVICE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/shared_memory.h" 9 #include "base/memory/shared_memory.h"
10 #include "gpu/command_buffer/common/command_buffer.h" 10 #include "gpu/command_buffer/common/command_buffer.h"
(...skipping 24 matching lines...) Expand all
35 virtual void SetContextLostReason(error::ContextLostReason) = 0; 35 virtual void SetContextLostReason(error::ContextLostReason) = 0;
36 }; 36 };
37 37
38 // An object that implements a shared memory command buffer and a synchronous 38 // An object that implements a shared memory command buffer and a synchronous
39 // API to manage the put and get pointers. 39 // API to manage the put and get pointers.
40 class GPU_EXPORT CommandBufferService : public CommandBufferServiceBase { 40 class GPU_EXPORT CommandBufferService : public CommandBufferServiceBase {
41 public: 41 public:
42 typedef base::Callback<bool(int32)> GetBufferChangedCallback; 42 typedef base::Callback<bool(int32)> GetBufferChangedCallback;
43 explicit CommandBufferService( 43 explicit CommandBufferService(
44 TransferBufferManagerInterface* transfer_buffer_manager); 44 TransferBufferManagerInterface* transfer_buffer_manager);
45 virtual ~CommandBufferService(); 45 ~CommandBufferService() override;
46 46
47 // CommandBuffer implementation: 47 // CommandBuffer implementation:
48 virtual bool Initialize() override; 48 bool Initialize() override;
49 virtual State GetLastState() override; 49 State GetLastState() override;
50 virtual int32 GetLastToken() override; 50 int32 GetLastToken() override;
51 virtual void Flush(int32 put_offset) override; 51 void Flush(int32 put_offset) override;
52 virtual void WaitForTokenInRange(int32 start, int32 end) override; 52 void WaitForTokenInRange(int32 start, int32 end) override;
53 virtual void WaitForGetOffsetInRange(int32 start, int32 end) override; 53 void WaitForGetOffsetInRange(int32 start, int32 end) override;
54 virtual void SetGetBuffer(int32 transfer_buffer_id) override; 54 void SetGetBuffer(int32 transfer_buffer_id) override;
55 virtual scoped_refptr<Buffer> CreateTransferBuffer(size_t size, 55 scoped_refptr<Buffer> CreateTransferBuffer(size_t size, int32* id) override;
56 int32* id) override; 56 void DestroyTransferBuffer(int32 id) override;
57 virtual void DestroyTransferBuffer(int32 id) override;
58 57
59 // CommandBufferServiceBase implementation: 58 // CommandBufferServiceBase implementation:
60 virtual void SetGetOffset(int32 get_offset) override; 59 void SetGetOffset(int32 get_offset) override;
61 virtual scoped_refptr<Buffer> GetTransferBuffer(int32 id) override; 60 scoped_refptr<Buffer> GetTransferBuffer(int32 id) override;
62 virtual void SetToken(int32 token) override; 61 void SetToken(int32 token) override;
63 virtual void SetParseError(error::Error error) override; 62 void SetParseError(error::Error error) override;
64 virtual void SetContextLostReason(error::ContextLostReason) override; 63 void SetContextLostReason(error::ContextLostReason) override;
65 64
66 // Sets a callback that is called whenever the put offset is changed. When 65 // Sets a callback that is called whenever the put offset is changed. When
67 // called with sync==true, the callback must not return until some progress 66 // called with sync==true, the callback must not return until some progress
68 // has been made (unless the command buffer is empty), i.e. the get offset 67 // has been made (unless the command buffer is empty), i.e. the get offset
69 // must have changed. It need not process the entire command buffer though. 68 // must have changed. It need not process the entire command buffer though.
70 // This allows concurrency between the writer and the reader while giving the 69 // This allows concurrency between the writer and the reader while giving the
71 // writer a means of waiting for the reader to make some progress before 70 // writer a means of waiting for the reader to make some progress before
72 // attempting to write more to the command buffer. Takes ownership of 71 // attempting to write more to the command buffer. Takes ownership of
73 // callback. 72 // callback.
74 virtual void SetPutOffsetChangeCallback(const base::Closure& callback); 73 virtual void SetPutOffsetChangeCallback(const base::Closure& callback);
(...skipping 28 matching lines...) Expand all
103 uint32 generation_; 102 uint32 generation_;
104 error::Error error_; 103 error::Error error_;
105 error::ContextLostReason context_lost_reason_; 104 error::ContextLostReason context_lost_reason_;
106 105
107 DISALLOW_COPY_AND_ASSIGN(CommandBufferService); 106 DISALLOW_COPY_AND_ASSIGN(CommandBufferService);
108 }; 107 };
109 108
110 } // namespace gpu 109 } // namespace gpu
111 110
112 #endif // GPU_COMMAND_BUFFER_SERVICE_COMMAND_BUFFER_SERVICE_H_ 111 #endif // GPU_COMMAND_BUFFER_SERVICE_COMMAND_BUFFER_SERVICE_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/async_pixel_transfer_manager_sync.cc ('k') | gpu/command_buffer/service/common_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698