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

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

Issue 1230203007: Re-land: cc: Use worker context for one-copy tile initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 4 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));
202 Flush(); 203 Flush();
203 if (!WaitForGetOffsetInRange(put_, put_)) 204 if (!WaitForGetOffsetInRange(put_, put_))
204 return false; 205 return false;
205 DCHECK_EQ(get_offset(), put_); 206 DCHECK_EQ(get_offset(), put_);
206 207
207 CalcImmediateEntries(0); 208 CalcImmediateEntries(0);
208 209
209 return true; 210 return true;
210 } 211 }
211 212
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 if (!WaitForGetOffsetInRange(put_ + count + 1, put_)) 303 if (!WaitForGetOffsetInRange(put_ + count + 1, put_))
303 return; 304 return;
304 CalcImmediateEntries(count); 305 CalcImmediateEntries(count);
305 DCHECK_GE(immediate_entry_count_, count); 306 DCHECK_GE(immediate_entry_count_, count);
306 } 307 }
307 } 308 }
308 } 309 }
309 310
310 311
311 } // namespace gpu 312 } // 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