OLD | NEW |
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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())); |
92 | 92 |
93 if (error::IsError(error)) { | 93 if (error::IsError(error)) { |
94 LOG(ERROR) << "[" << decoder_ << "] " | |
95 << "GPU PARSE ERROR: " << error; | |
96 command_buffer_->SetContextLostReason(decoder_->GetContextLostReason()); | 94 command_buffer_->SetContextLostReason(decoder_->GetContextLostReason()); |
97 command_buffer_->SetParseError(error); | 95 command_buffer_->SetParseError(error); |
98 break; | 96 break; |
99 } | 97 } |
100 | 98 |
101 if (!command_processed_callback_.is_null()) | 99 if (!command_processed_callback_.is_null()) |
102 command_processed_callback_.Run(); | 100 command_processed_callback_.Run(); |
103 | 101 |
104 if (unscheduled_count_ > 0) | 102 if (unscheduled_count_ > 0) |
105 break; | 103 break; |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 base::Closure task_) | 301 base::Closure task_) |
304 : fence(fence_), | 302 : fence(fence_), |
305 issue_time(base::Time::Now()), | 303 issue_time(base::Time::Now()), |
306 task(task_) { | 304 task(task_) { |
307 } | 305 } |
308 | 306 |
309 GpuScheduler::UnscheduleFence::~UnscheduleFence() { | 307 GpuScheduler::UnscheduleFence::~UnscheduleFence() { |
310 } | 308 } |
311 | 309 |
312 } // namespace gpu | 310 } // namespace gpu |
OLD | NEW |