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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 } | 311 } |
312 } | 312 } |
313 CleanupFlushedReleases(highest_verified_flush_id); | 313 CleanupFlushedReleases(highest_verified_flush_id); |
314 } | 314 } |
315 if (put_offset_changed) { | 315 if (put_offset_changed) { |
316 latency_info_.clear(); | 316 latency_info_.clear(); |
317 pending_sync_token_fences_.clear(); | 317 pending_sync_token_fences_.clear(); |
318 } | 318 } |
319 } | 319 } |
320 | 320 |
321 void CommandBufferProxyImpl::SetLatencyInfo( | 321 void CommandBufferProxyImpl::AddLatencyInfo( |
322 const std::vector<ui::LatencyInfo>& latency_info) { | 322 const std::vector<ui::LatencyInfo>& latency_info) { |
323 CheckLock(); | 323 CheckLock(); |
324 for (size_t i = 0; i < latency_info.size(); i++) | 324 for (size_t i = 0; i < latency_info.size(); i++) |
325 latency_info_.push_back(latency_info[i]); | 325 latency_info_.push_back(latency_info[i]); |
326 } | 326 } |
327 | 327 |
328 void CommandBufferProxyImpl::SetSwapBuffersCompletionCallback( | 328 void CommandBufferProxyImpl::SetSwapBuffersCompletionCallback( |
329 const SwapBuffersCompletionCallback& callback) { | 329 const SwapBuffersCompletionCallback& callback) { |
330 CheckLock(); | 330 CheckLock(); |
331 swap_buffers_completion_callback_ = callback; | 331 swap_buffers_completion_callback_ = callback; |
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
947 return; | 947 return; |
948 channel_->FlushPendingStream(stream_id_); | 948 channel_->FlushPendingStream(stream_id_); |
949 channel_->Send(new GpuChannelMsg_DestroyCommandBuffer(route_id_)); | 949 channel_->Send(new GpuChannelMsg_DestroyCommandBuffer(route_id_)); |
950 channel_->RemoveRoute(route_id_); | 950 channel_->RemoveRoute(route_id_); |
951 channel_ = nullptr; | 951 channel_ = nullptr; |
952 if (gpu_control_client_) | 952 if (gpu_control_client_) |
953 gpu_control_client_->OnGpuControlLostContext(); | 953 gpu_control_client_->OnGpuControlLostContext(); |
954 } | 954 } |
955 | 955 |
956 } // namespace gpu | 956 } // namespace gpu |
OLD | NEW |