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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 DCHECK(unschedule_fences_.empty()); | 67 DCHECK(unschedule_fences_.empty()); |
68 | 68 |
69 error = parser_->ProcessCommand(); | 69 error = parser_->ProcessCommand(); |
70 | 70 |
71 // TODO(piman): various classes duplicate various pieces of state, leading | 71 // TODO(piman): various classes duplicate various pieces of state, leading |
72 // to needlessly complex update logic. It should be possible to simply | 72 // to needlessly complex update logic. It should be possible to simply |
73 // share the state across all of them. | 73 // share the state across all of them. |
74 command_buffer_->SetGetOffset(static_cast<int32>(parser_->get())); | 74 command_buffer_->SetGetOffset(static_cast<int32>(parser_->get())); |
75 | 75 |
76 if (error::IsError(error)) { | 76 if (error::IsError(error)) { |
| 77 LOG(ERROR) << "[" << decoder_ << "] " |
| 78 << "GPU PARSE ERROR: " << error; |
77 command_buffer_->SetContextLostReason(decoder_->GetContextLostReason()); | 79 command_buffer_->SetContextLostReason(decoder_->GetContextLostReason()); |
78 command_buffer_->SetParseError(error); | 80 command_buffer_->SetParseError(error); |
79 return; | 81 return; |
80 } | 82 } |
81 | 83 |
82 if (!command_processed_callback_.is_null()) | 84 if (!command_processed_callback_.is_null()) |
83 command_processed_callback_.Run(); | 85 command_processed_callback_.Run(); |
84 | 86 |
85 if (unscheduled_count_ > 0) | 87 if (unscheduled_count_ > 0) |
86 return; | 88 return; |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 } | 236 } |
235 | 237 |
236 GpuScheduler::UnscheduleFence::UnscheduleFence( | 238 GpuScheduler::UnscheduleFence::UnscheduleFence( |
237 gfx::GLFence* fence_, base::Closure task_): fence(fence_), task(task_) { | 239 gfx::GLFence* fence_, base::Closure task_): fence(fence_), task(task_) { |
238 } | 240 } |
239 | 241 |
240 GpuScheduler::UnscheduleFence::~UnscheduleFence() { | 242 GpuScheduler::UnscheduleFence::~UnscheduleFence() { |
241 } | 243 } |
242 | 244 |
243 } // namespace gpu | 245 } // namespace gpu |
OLD | NEW |