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

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

Issue 1331843005: Implemented new fence syncs which replaces the old sync points. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Some fixes 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"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 transfer_buffer_manager_->DestroyTransferBuffer(id); 146 transfer_buffer_manager_->DestroyTransferBuffer(id);
147 if (id == ring_buffer_id_) { 147 if (id == ring_buffer_id_) {
148 ring_buffer_id_ = -1; 148 ring_buffer_id_ = -1;
149 ring_buffer_ = NULL; 149 ring_buffer_ = NULL;
150 num_entries_ = 0; 150 num_entries_ = 0;
151 get_offset_ = 0; 151 get_offset_ = 0;
152 put_offset_ = 0; 152 put_offset_ = 0;
153 } 153 }
154 } 154 }
155 155
156 void CommandBufferService::GetRouteInformation(int* channel_id,
157 uint32_t* route_id) {
158 if (channel_id)
159 *channel_id = 0;
160
161 if (route_id)
162 *route_id = 0;
163 }
164
156 scoped_refptr<Buffer> CommandBufferService::GetTransferBuffer(int32 id) { 165 scoped_refptr<Buffer> CommandBufferService::GetTransferBuffer(int32 id) {
157 return transfer_buffer_manager_->GetTransferBuffer(id); 166 return transfer_buffer_manager_->GetTransferBuffer(id);
158 } 167 }
159 168
160 bool CommandBufferService::RegisterTransferBuffer( 169 bool CommandBufferService::RegisterTransferBuffer(
161 int32 id, 170 int32 id,
162 scoped_ptr<BufferBacking> buffer) { 171 scoped_ptr<BufferBacking> buffer) {
163 return transfer_buffer_manager_->RegisterTransferBuffer(id, buffer.Pass()); 172 return transfer_buffer_manager_->RegisterTransferBuffer(id, buffer.Pass());
164 } 173 }
165 174
(...skipping 28 matching lines...) Expand all
194 const GetBufferChangedCallback& callback) { 203 const GetBufferChangedCallback& callback) {
195 get_buffer_change_callback_ = callback; 204 get_buffer_change_callback_ = callback;
196 } 205 }
197 206
198 void CommandBufferService::SetParseErrorCallback( 207 void CommandBufferService::SetParseErrorCallback(
199 const base::Closure& callback) { 208 const base::Closure& callback) {
200 parse_error_callback_ = callback; 209 parse_error_callback_ = callback;
201 } 210 }
202 211
203 } // namespace gpu 212 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698