Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(613)

Side by Side Diff: gpu/ipc/client/command_buffer_proxy_impl.cc

Issue 2779303002: [EXPERIMENT] Revert "Route D3D VSync signal to Compositor" (Closed)
Patch Set: Resolve merge conflict Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 CheckLock(); 330 CheckLock();
331 swap_buffers_completion_callback_ = callback; 331 swap_buffers_completion_callback_ = callback;
332 } 332 }
333 333
334 void CommandBufferProxyImpl::SetUpdateVSyncParametersCallback( 334 void CommandBufferProxyImpl::SetUpdateVSyncParametersCallback(
335 const UpdateVSyncParametersCallback& callback) { 335 const UpdateVSyncParametersCallback& callback) {
336 CheckLock(); 336 CheckLock();
337 update_vsync_parameters_completion_callback_ = callback; 337 update_vsync_parameters_completion_callback_ = callback;
338 } 338 }
339 339
340 void CommandBufferProxyImpl::SetNeedsVSync(bool needs_vsync) {
341 CheckLock();
342 base::AutoLock lock(last_state_lock_);
343 if (last_state_.error != gpu::error::kNoError)
344 return;
345
346 Send(new GpuCommandBufferMsg_SetNeedsVSync(route_id_, needs_vsync));
347 }
348
349 gpu::CommandBuffer::State CommandBufferProxyImpl::WaitForTokenInRange( 340 gpu::CommandBuffer::State CommandBufferProxyImpl::WaitForTokenInRange(
350 int32_t start, 341 int32_t start,
351 int32_t end) { 342 int32_t end) {
352 CheckLock(); 343 CheckLock();
353 base::AutoLock lock(last_state_lock_); 344 base::AutoLock lock(last_state_lock_);
354 TRACE_EVENT2("gpu", "CommandBufferProxyImpl::WaitForToken", "start", start, 345 TRACE_EVENT2("gpu", "CommandBufferProxyImpl::WaitForToken", "start", start,
355 "end", end); 346 "end", end);
356 // Error needs to be checked in case the state was updated on another thread. 347 // Error needs to be checked in case the state was updated on another thread.
357 // We need to make sure that the reentrant context loss callback is called so 348 // We need to make sure that the reentrant context loss callback is called so
358 // that the share group is also lost before we return any error up the stack. 349 // that the share group is also lost before we return any error up the stack.
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 return; 938 return;
948 channel_->FlushPendingStream(stream_id_); 939 channel_->FlushPendingStream(stream_id_);
949 channel_->Send(new GpuChannelMsg_DestroyCommandBuffer(route_id_)); 940 channel_->Send(new GpuChannelMsg_DestroyCommandBuffer(route_id_));
950 channel_->RemoveRoute(route_id_); 941 channel_->RemoveRoute(route_id_);
951 channel_ = nullptr; 942 channel_ = nullptr;
952 if (gpu_control_client_) 943 if (gpu_control_client_)
953 gpu_control_client_->OnGpuControlLostContext(); 944 gpu_control_client_->OnGpuControlLostContext();
954 } 945 }
955 946
956 } // namespace gpu 947 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/ipc/client/command_buffer_proxy_impl.h ('k') | gpu/ipc/service/image_transport_surface_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698