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

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

Issue 1336703002: Revert of Re-land: cc: Use worker context for one-copy tile initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 // This file contains the implementation of the command buffer helper class. 5 // This file contains the implementation of the command buffer helper class.
6 6
7 #include "gpu/command_buffer/client/cmd_buffer_helper.h" 7 #include "gpu/command_buffer/client/cmd_buffer_helper.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 // error is set. 191 // error is set.
192 bool CommandBufferHelper::Finish() { 192 bool CommandBufferHelper::Finish() {
193 TRACE_EVENT0("gpu", "CommandBufferHelper::Finish"); 193 TRACE_EVENT0("gpu", "CommandBufferHelper::Finish");
194 if (!usable()) { 194 if (!usable()) {
195 return false; 195 return false;
196 } 196 }
197 // If there is no work just exit. 197 // If there is no work just exit.
198 if (put_ == get_offset()) { 198 if (put_ == get_offset()) {
199 return true; 199 return true;
200 } 200 }
201 DCHECK(HaveRingBuffer() || 201 DCHECK(HaveRingBuffer());
202 error::IsError(command_buffer_->GetLastState().error));
203 Flush(); 202 Flush();
204 if (!WaitForGetOffsetInRange(put_, put_)) 203 if (!WaitForGetOffsetInRange(put_, put_))
205 return false; 204 return false;
206 DCHECK_EQ(get_offset(), put_); 205 DCHECK_EQ(get_offset(), put_);
207 206
208 CalcImmediateEntries(0); 207 CalcImmediateEntries(0);
209 208
210 return true; 209 return true;
211 } 210 }
212 211
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 if (!WaitForGetOffsetInRange(put_ + count + 1, put_)) 302 if (!WaitForGetOffsetInRange(put_ + count + 1, put_))
304 return; 303 return;
305 CalcImmediateEntries(count); 304 CalcImmediateEntries(count);
306 DCHECK_GE(immediate_entry_count_, count); 305 DCHECK_GE(immediate_entry_count_, count);
307 } 306 }
308 } 307 }
309 } 308 }
310 309
311 310
312 } // namespace gpu 311 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/build_gles2_cmd_buffer.py ('k') | gpu/command_buffer/service/query_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698