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

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: Rebase. 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 base::Closure task_) 301 base::Closure task_)
302 : fence(fence_), 302 : fence(fence_),
303 issue_time(base::Time::Now()), 303 issue_time(base::Time::Now()),
304 task(task_) { 304 task(task_) {
305 } 305 }
306 306
307 GpuScheduler::UnscheduleFence::~UnscheduleFence() { 307 GpuScheduler::UnscheduleFence::~UnscheduleFence() {
308 } 308 }
309 309
310 } // namespace gpu 310 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc ('k') | gpu/command_buffer/service/gpu_scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698