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

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

Issue 1345813002: Added a unique command buffer ID for command buffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added gpu namespace for gles2_conform_support/egl/display.cc Created 5 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
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 #include "gpu/command_buffer/service/command_buffer_service.h" 5 #include "gpu/command_buffer/service/command_buffer_service.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
11 #include "gpu/command_buffer/common/cmd_buffer_common.h" 11 #include "gpu/command_buffer/common/cmd_buffer_common.h"
12 #include "gpu/command_buffer/common/command_buffer_shared.h" 12 #include "gpu/command_buffer/common/command_buffer_shared.h"
13 #include "gpu/command_buffer/service/transfer_buffer_manager.h" 13 #include "gpu/command_buffer/service/transfer_buffer_manager.h"
14 14
15 using ::base::SharedMemory; 15 using ::base::SharedMemory;
16 16
17 namespace gpu { 17 namespace gpu {
18 18
19 CommandBufferService::CommandBufferService( 19 CommandBufferService::CommandBufferService(
20 TransferBufferManagerInterface* transfer_buffer_manager) 20 TransferBufferManagerInterface* transfer_buffer_manager,
21 : ring_buffer_id_(-1), 21 CommandBufferNamespace namespace_id, uint64_t command_buffer_id)
22 : CommandBufferServiceBase(namespace_id, command_buffer_id),
23 ring_buffer_id_(-1),
22 shared_state_(NULL), 24 shared_state_(NULL),
23 num_entries_(0), 25 num_entries_(0),
24 get_offset_(0), 26 get_offset_(0),
25 put_offset_(0), 27 put_offset_(0),
26 transfer_buffer_manager_(transfer_buffer_manager), 28 transfer_buffer_manager_(transfer_buffer_manager),
27 token_(0), 29 token_(0),
28 generation_(0), 30 generation_(0),
29 error_(error::kNoError), 31 error_(error::kNoError),
30 context_lost_reason_(error::kUnknown) { 32 context_lost_reason_(error::kUnknown) {
31 } 33 }
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 const GetBufferChangedCallback& callback) { 196 const GetBufferChangedCallback& callback) {
195 get_buffer_change_callback_ = callback; 197 get_buffer_change_callback_ = callback;
196 } 198 }
197 199
198 void CommandBufferService::SetParseErrorCallback( 200 void CommandBufferService::SetParseErrorCallback(
199 const base::Closure& callback) { 201 const base::Closure& callback) {
200 parse_error_callback_ = callback; 202 parse_error_callback_ = callback;
201 } 203 }
202 204
203 } // namespace gpu 205 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698