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 |
| 381 int32_t GpuCommandBufferStub::GetRouteID() const { |
| 382 return route_id_; |
| 383 } |
| 384 |
377 bool GpuCommandBufferStub::IsScheduled() { | 385 bool GpuCommandBufferStub::IsScheduled() { |
378 return (!executor_.get() || executor_->scheduled()); | 386 return (!executor_.get() || executor_->scheduled()); |
379 } | 387 } |
380 | 388 |
381 void GpuCommandBufferStub::PollWork() { | 389 void GpuCommandBufferStub::PollWork() { |
382 // Post another delayed task if we have not yet reached the time at which | 390 // Post another delayed task if we have not yet reached the time at which |
383 // we should process delayed work. | 391 // we should process delayed work. |
384 base::TimeTicks current_time = base::TimeTicks::Now(); | 392 base::TimeTicks current_time = base::TimeTicks::Now(); |
385 DCHECK(!process_delayed_work_time_.is_null()); | 393 DCHECK(!process_delayed_work_time_.is_null()); |
386 if (process_delayed_work_time_ > current_time) { | 394 if (process_delayed_work_time_ > current_time) { |
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1206 command_buffer_->GetLastState().error == error::kLostContext) | 1214 command_buffer_->GetLastState().error == error::kLostContext) |
1207 return; | 1215 return; |
1208 | 1216 |
1209 command_buffer_->SetContextLostReason(error::kUnknown); | 1217 command_buffer_->SetContextLostReason(error::kUnknown); |
1210 if (decoder_) | 1218 if (decoder_) |
1211 decoder_->MarkContextLost(error::kUnknown); | 1219 decoder_->MarkContextLost(error::kUnknown); |
1212 command_buffer_->SetParseError(error::kLostContext); | 1220 command_buffer_->SetParseError(error::kLostContext); |
1213 } | 1221 } |
1214 | 1222 |
1215 } // namespace gpu | 1223 } // namespace gpu |
OLD | NEW |