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

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

Issue 6316002: Make CommandBuffer::Flush asynchronous, and add CommandBuffer::FlushSync with former semantics. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 10 matching lines...) Expand all
21 // API to manage the put and get pointers. 21 // API to manage the put and get pointers.
22 class CommandBufferService : public CommandBuffer { 22 class CommandBufferService : public CommandBuffer {
23 public: 23 public:
24 CommandBufferService(); 24 CommandBufferService();
25 virtual ~CommandBufferService(); 25 virtual ~CommandBufferService();
26 26
27 // CommandBuffer implementation: 27 // CommandBuffer implementation:
28 virtual bool Initialize(int32 size); 28 virtual bool Initialize(int32 size);
29 virtual Buffer GetRingBuffer(); 29 virtual Buffer GetRingBuffer();
30 virtual State GetState(); 30 virtual State GetState();
31 virtual State Flush(int32 put_offset); 31 virtual void Flush(int32 put_offset);
32 virtual State FlushSync(int32 put_offset);
32 virtual void SetGetOffset(int32 get_offset); 33 virtual void SetGetOffset(int32 get_offset);
33 virtual int32 CreateTransferBuffer(size_t size); 34 virtual int32 CreateTransferBuffer(size_t size);
34 virtual void DestroyTransferBuffer(int32 id); 35 virtual void DestroyTransferBuffer(int32 id);
35 virtual Buffer GetTransferBuffer(int32 handle); 36 virtual Buffer GetTransferBuffer(int32 handle);
36 virtual void SetToken(int32 token); 37 virtual void SetToken(int32 token);
37 virtual void SetParseError(error::Error error); 38 virtual void SetParseError(error::Error error);
38 39
39 // Sets a callback that should be posted on another thread whenever the put 40 // Sets a callback that should be posted on another thread whenever the put
40 // offset is changed. The callback must not return until some progress has 41 // offset is changed. The callback must not return until some progress has
41 // been made (unless the command buffer is empty), i.e. the 42 // been made (unless the command buffer is empty), i.e. the
(...skipping 14 matching lines...) Expand all
56 scoped_ptr<Callback0::Type> put_offset_change_callback_; 57 scoped_ptr<Callback0::Type> put_offset_change_callback_;
57 std::vector<linked_ptr< base::SharedMemory> > registered_objects_; 58 std::vector<linked_ptr< base::SharedMemory> > registered_objects_;
58 std::set<int32> unused_registered_object_elements_; 59 std::set<int32> unused_registered_object_elements_;
59 int32 token_; 60 int32 token_;
60 error::Error error_; 61 error::Error error_;
61 }; 62 };
62 63
63 } // namespace gpu 64 } // namespace gpu
64 65
65 #endif // GPU_COMMAND_BUFFER_SERVICE_COMMAND_BUFFER_SERVICE_H_ 66 #endif // GPU_COMMAND_BUFFER_SERVICE_COMMAND_BUFFER_SERVICE_H_
OLDNEW
« 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