| 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/ipc/service/gpu_command_buffer_stub.h" | 5 #include "gpu/ipc/service/gpu_command_buffer_stub.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 const LatencyInfoCallback& callback) { | 367 const LatencyInfoCallback& callback) { |
| 368 latency_info_callback_ = callback; | 368 latency_info_callback_ = callback; |
| 369 } | 369 } |
| 370 | 370 |
| 371 void GpuCommandBufferStub::UpdateVSyncParameters(base::TimeTicks timebase, | 371 void GpuCommandBufferStub::UpdateVSyncParameters(base::TimeTicks timebase, |
| 372 base::TimeDelta interval) { | 372 base::TimeDelta interval) { |
| 373 Send(new GpuCommandBufferMsg_UpdateVSyncParameters(route_id_, timebase, | 373 Send(new GpuCommandBufferMsg_UpdateVSyncParameters(route_id_, timebase, |
| 374 interval)); | 374 interval)); |
| 375 } | 375 } |
| 376 | 376 |
| 377 void GpuCommandBufferStub::AddFilter(IPC::MessageFilter* message_filter) { |
| 378 return channel_->AddFilter(message_filter); |
| 379 } |
| 380 |
| 377 bool GpuCommandBufferStub::IsScheduled() { | 381 bool GpuCommandBufferStub::IsScheduled() { |
| 378 return (!executor_.get() || executor_->scheduled()); | 382 return (!executor_.get() || executor_->scheduled()); |
| 379 } | 383 } |
| 380 | 384 |
| 381 void GpuCommandBufferStub::PollWork() { | 385 void GpuCommandBufferStub::PollWork() { |
| 382 // Post another delayed task if we have not yet reached the time at which | 386 // Post another delayed task if we have not yet reached the time at which |
| 383 // we should process delayed work. | 387 // we should process delayed work. |
| 384 base::TimeTicks current_time = base::TimeTicks::Now(); | 388 base::TimeTicks current_time = base::TimeTicks::Now(); |
| 385 DCHECK(!process_delayed_work_time_.is_null()); | 389 DCHECK(!process_delayed_work_time_.is_null()); |
| 386 if (process_delayed_work_time_ > current_time) { | 390 if (process_delayed_work_time_ > current_time) { |
| (...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1202 command_buffer_->GetLastState().error == error::kLostContext) | 1206 command_buffer_->GetLastState().error == error::kLostContext) |
| 1203 return; | 1207 return; |
| 1204 | 1208 |
| 1205 command_buffer_->SetContextLostReason(error::kUnknown); | 1209 command_buffer_->SetContextLostReason(error::kUnknown); |
| 1206 if (decoder_) | 1210 if (decoder_) |
| 1207 decoder_->MarkContextLost(error::kUnknown); | 1211 decoder_->MarkContextLost(error::kUnknown); |
| 1208 command_buffer_->SetParseError(error::kLostContext); | 1212 command_buffer_->SetParseError(error::kLostContext); |
| 1209 } | 1213 } |
| 1210 | 1214 |
| 1211 } // namespace gpu | 1215 } // namespace gpu |
| OLD | NEW |