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

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

Issue 558513003: command_buffer: Batch command processing to reduce handler overheads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a bad return in DoCommand(). Created 6 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/gpu_scheduler.h" 5 #include "gpu/command_buffer/service/gpu_scheduler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 error::Error error = error::kNoError; 71 error::Error error = error::kNoError;
72 if (decoder_) 72 if (decoder_)
73 decoder_->BeginDecoding(); 73 decoder_->BeginDecoding();
74 while (!parser_->IsEmpty()) { 74 while (!parser_->IsEmpty()) {
75 if (IsPreempted()) 75 if (IsPreempted())
76 break; 76 break;
77 77
78 DCHECK(IsScheduled()); 78 DCHECK(IsScheduled());
79 DCHECK(unschedule_fences_.empty()); 79 DCHECK(unschedule_fences_.empty());
80 80
81 error = parser_->ProcessCommand(); 81 error = parser_->ProcessCommands(CommandParser::kParseCommandsSlice);
82 82
83 if (error == error::kDeferCommandUntilLater) { 83 if (error == error::kDeferCommandUntilLater) {
84 DCHECK_GT(unscheduled_count_, 0); 84 DCHECK_GT(unscheduled_count_, 0);
85 break; 85 break;
86 } 86 }
87 87
88 // TODO(piman): various classes duplicate various pieces of state, leading 88 // TODO(piman): various classes duplicate various pieces of state, leading
89 // to needlessly complex update logic. It should be possible to simply 89 // to needlessly complex update logic. It should be possible to simply
90 // share the state across all of them. 90 // share the state across all of them.
91 command_buffer_->SetGetOffset(static_cast<int32>(parser_->get())); 91 command_buffer_->SetGetOffset(static_cast<int32>(parser_->get()));
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 base::Closure task_) 303 base::Closure task_)
304 : fence(fence_), 304 : fence(fence_),
305 issue_time(base::Time::Now()), 305 issue_time(base::Time::Now()),
306 task(task_) { 306 task(task_) {
307 } 307 }
308 308
309 GpuScheduler::UnscheduleFence::~UnscheduleFence() { 309 GpuScheduler::UnscheduleFence::~UnscheduleFence() {
310 } 310 }
311 311
312 } // namespace gpu 312 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698