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

Side by Side Diff: gpu/command_buffer/client/cmd_buffer_helper.h

Issue 10883036: Make glGetQueryObjectuivEXT return true for GL_QUERY_RESULT_AVAILABLE_EXT (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
« no previous file with comments | « no previous file | gpu/command_buffer/client/cmd_buffer_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // 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 26 matching lines...) Expand all
37 public: 37 public:
38 explicit CommandBufferHelper(CommandBuffer* command_buffer); 38 explicit CommandBufferHelper(CommandBuffer* command_buffer);
39 virtual ~CommandBufferHelper(); 39 virtual ~CommandBufferHelper();
40 40
41 // Initializes the CommandBufferHelper. 41 // Initializes the CommandBufferHelper.
42 // Parameters: 42 // Parameters:
43 // ring_buffer_size: The size of the ring buffer portion of the command 43 // ring_buffer_size: The size of the ring buffer portion of the command
44 // buffer. 44 // buffer.
45 bool Initialize(int32 ring_buffer_size); 45 bool Initialize(int32 ring_buffer_size);
46 46
47 // True if the context is lost.
48 bool IsContextLost();
49
47 // Asynchronously flushes the commands, setting the put pointer to let the 50 // Asynchronously flushes the commands, setting the put pointer to let the
48 // buffer interface know that new commands have been added. After a flush 51 // buffer interface know that new commands have been added. After a flush
49 // returns, the command buffer service is aware of all pending commands. 52 // returns, the command buffer service is aware of all pending commands.
50 void Flush(); 53 void Flush();
51 54
52 // Flushes the commands, setting the put pointer to let the buffer interface 55 // Flushes the commands, setting the put pointer to let the buffer interface
53 // know that new commands have been added. After a flush returns, the command 56 // know that new commands have been added. After a flush returns, the command
54 // buffer service is aware of all pending commands and it is guaranteed to 57 // buffer service is aware of all pending commands and it is guaranteed to
55 // have made some progress in processing them. Returns whether the flush was 58 // have made some progress in processing them. Returns whether the flush was
56 // successful. The flush will fail if the command buffer service has 59 // successful. The flush will fail if the command buffer service has
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 int32 ring_buffer_size_; 284 int32 ring_buffer_size_;
282 Buffer ring_buffer_; 285 Buffer ring_buffer_;
283 CommandBufferEntry* entries_; 286 CommandBufferEntry* entries_;
284 int32 total_entry_count_; // the total number of entries 287 int32 total_entry_count_; // the total number of entries
285 int32 usable_entry_count_; // the usable number (ie, minus space for jump) 288 int32 usable_entry_count_; // the usable number (ie, minus space for jump)
286 int32 token_; 289 int32 token_;
287 int32 put_; 290 int32 put_;
288 int32 last_put_sent_; 291 int32 last_put_sent_;
289 int commands_issued_; 292 int commands_issued_;
290 bool usable_; 293 bool usable_;
294 bool context_lost_;
291 295
292 // Using C runtime instead of base because this file cannot depend on base. 296 // Using C runtime instead of base because this file cannot depend on base.
293 clock_t last_flush_time_; 297 clock_t last_flush_time_;
294 298
295 friend class CommandBufferHelperTest; 299 friend class CommandBufferHelperTest;
296 DISALLOW_COPY_AND_ASSIGN(CommandBufferHelper); 300 DISALLOW_COPY_AND_ASSIGN(CommandBufferHelper);
297 }; 301 };
298 302
299 } // namespace gpu 303 } // namespace gpu
300 304
301 #endif // GPU_COMMAND_BUFFER_CLIENT_CMD_BUFFER_HELPER_H_ 305 #endif // GPU_COMMAND_BUFFER_CLIENT_CMD_BUFFER_HELPER_H_
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/client/cmd_buffer_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698