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/client/command_buffer_proxy_impl.h" | 5 #include "gpu/ipc/client/command_buffer_proxy_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
568 | 568 |
569 void CommandBufferProxyImpl::SetLock(base::Lock* lock) { | 569 void CommandBufferProxyImpl::SetLock(base::Lock* lock) { |
570 lock_ = lock; | 570 lock_ = lock; |
571 } | 571 } |
572 | 572 |
573 void CommandBufferProxyImpl::EnsureWorkVisible() { | 573 void CommandBufferProxyImpl::EnsureWorkVisible() { |
574 if (channel_) | 574 if (channel_) |
575 channel_->ValidateFlushIDReachedServer(stream_id_, true); | 575 channel_->ValidateFlushIDReachedServer(stream_id_, true); |
576 } | 576 } |
577 | 577 |
| 578 void CommandBufferProxyImpl::EnsureWorkVisibleAsync() { |
| 579 if (channel_) |
| 580 channel_->FlushPendingStream(stream_id_); |
| 581 } |
| 582 |
578 gpu::CommandBufferNamespace CommandBufferProxyImpl::GetNamespaceID() const { | 583 gpu::CommandBufferNamespace CommandBufferProxyImpl::GetNamespaceID() const { |
579 return gpu::CommandBufferNamespace::GPU_IO; | 584 return gpu::CommandBufferNamespace::GPU_IO; |
580 } | 585 } |
581 | 586 |
582 gpu::CommandBufferId CommandBufferProxyImpl::GetCommandBufferID() const { | 587 gpu::CommandBufferId CommandBufferProxyImpl::GetCommandBufferID() const { |
583 return command_buffer_id_; | 588 return command_buffer_id_; |
584 } | 589 } |
585 | 590 |
586 int32_t CommandBufferProxyImpl::GetExtraCommandBufferData() const { | 591 int32_t CommandBufferProxyImpl::GetExtraCommandBufferData() const { |
587 return stream_id_; | 592 return stream_id_; |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
947 return; | 952 return; |
948 channel_->FlushPendingStream(stream_id_); | 953 channel_->FlushPendingStream(stream_id_); |
949 channel_->Send(new GpuChannelMsg_DestroyCommandBuffer(route_id_)); | 954 channel_->Send(new GpuChannelMsg_DestroyCommandBuffer(route_id_)); |
950 channel_->RemoveRoute(route_id_); | 955 channel_->RemoveRoute(route_id_); |
951 channel_ = nullptr; | 956 channel_ = nullptr; |
952 if (gpu_control_client_) | 957 if (gpu_control_client_) |
953 gpu_control_client_->OnGpuControlLostContext(); | 958 gpu_control_client_->OnGpuControlLostContext(); |
954 } | 959 } |
955 | 960 |
956 } // namespace gpu | 961 } // namespace gpu |
OLD | NEW |