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

Side by Side Diff: gpu/command_buffer/client/cmd_buffer_helper.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 // This file contains the command buffer helper class. 5 // This file contains the command buffer helper class.
6 6
7 #ifndef GPU_COMMAND_BUFFER_CLIENT_CMD_BUFFER_HELPER_H_ 7 #ifndef GPU_COMMAND_BUFFER_CLIENT_CMD_BUFFER_HELPER_H_
8 #define GPU_COMMAND_BUFFER_CLIENT_CMD_BUFFER_HELPER_H_ 8 #define GPU_COMMAND_BUFFER_CLIENT_CMD_BUFFER_HELPER_H_
9 9
10 #include <string.h> 10 #include <string.h>
(...skipping 24 matching lines...) Expand all
35 public: 35 public:
36 explicit CommandBufferHelper(CommandBuffer* command_buffer); 36 explicit CommandBufferHelper(CommandBuffer* command_buffer);
37 virtual ~CommandBufferHelper(); 37 virtual ~CommandBufferHelper();
38 38
39 // Initializes the CommandBufferHelper. 39 // Initializes the CommandBufferHelper.
40 // Parameters: 40 // Parameters:
41 // ring_buffer_size: The size of the ring buffer portion of the command 41 // ring_buffer_size: The size of the ring buffer portion of the command
42 // buffer. 42 // buffer.
43 bool Initialize(int32 ring_buffer_size); 43 bool Initialize(int32 ring_buffer_size);
44 44
45 // Flushes the commands, setting the put pointer to let the buffer interface 45 // Flushes the commands, setting the put pointer to let the buffer interface
apatrick 2011/01/14 18:31:34 This comment is out-of-date now that Flush is asyn
Antoine Labour 2011/01/14 21:35:33 Done.
46 // know that new commands have been added. After a flush returns, the command 46 // know that new commands have been added. After a flush returns, the command
47 // buffer service is aware of all pending commands and it is guaranteed to 47 // buffer service is aware of all pending commands and it is guaranteed to
48 // have made some progress in processing them. Returns whether the flush was 48 // have made some progress in processing them. Returns whether the flush was
49 // successful. The flush will fail if the command buffer service has 49 // successful. The flush will fail if the command buffer service has
50 // disconnected. 50 // disconnected.
51 bool Flush(); 51 bool FlushSync();
52 void Flush();
52 53
53 // Waits until all the commands have been executed. Returns whether it 54 // Waits until all the commands have been executed. Returns whether it
54 // was successful. The function will fail if the command buffer service has 55 // was successful. The function will fail if the command buffer service has
55 // disconnected. 56 // disconnected.
56 bool Finish(); 57 bool Finish();
57 58
58 // Waits until a given number of available entries are available. 59 // Waits until a given number of available entries are available.
59 // Parameters: 60 // Parameters:
60 // count: number of entries needed. This value must be at most 61 // count: number of entries needed. This value must be at most
61 // the size of the buffer minus one. 62 // the size of the buffer minus one.
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 int32 get_; 227 int32 get_;
227 int32 put_; 228 int32 put_;
228 229
229 friend class CommandBufferHelperTest; 230 friend class CommandBufferHelperTest;
230 DISALLOW_COPY_AND_ASSIGN(CommandBufferHelper); 231 DISALLOW_COPY_AND_ASSIGN(CommandBufferHelper);
231 }; 232 };
232 233
233 } // namespace gpu 234 } // namespace gpu
234 235
235 #endif // GPU_COMMAND_BUFFER_CLIENT_CMD_BUFFER_HELPER_H_ 236 #endif // GPU_COMMAND_BUFFER_CLIENT_CMD_BUFFER_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698