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

Side by Side Diff: content/common/gpu/client/command_buffer_proxy_impl.cc

Issue 1166463004: Revert of Adding status to swap complete (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 "content/common/gpu/client/command_buffer_proxy_impl.h" 5 #include "content/common/gpu/client/command_buffer_proxy_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 if (last_state_.error == gpu::error::kNoError) 591 if (last_state_.error == gpu::error::kNoError)
592 shared_state()->Read(&last_state_); 592 shared_state()->Read(&last_state_);
593 } 593 }
594 594
595 gpu::CommandBufferSharedState* CommandBufferProxyImpl::shared_state() const { 595 gpu::CommandBufferSharedState* CommandBufferProxyImpl::shared_state() const {
596 return reinterpret_cast<gpu::CommandBufferSharedState*>( 596 return reinterpret_cast<gpu::CommandBufferSharedState*>(
597 shared_state_shm_->memory()); 597 shared_state_shm_->memory());
598 } 598 }
599 599
600 void CommandBufferProxyImpl::OnSwapBuffersCompleted( 600 void CommandBufferProxyImpl::OnSwapBuffersCompleted(
601 const std::vector<ui::LatencyInfo>& latency_info, 601 const std::vector<ui::LatencyInfo>& latency_info) {
602 gfx::SwapResult result) {
603 if (!swap_buffers_completion_callback_.is_null()) { 602 if (!swap_buffers_completion_callback_.is_null()) {
604 if (!ui::LatencyInfo::Verify( 603 if (!ui::LatencyInfo::Verify(
605 latency_info, "CommandBufferProxyImpl::OnSwapBuffersCompleted")) { 604 latency_info, "CommandBufferProxyImpl::OnSwapBuffersCompleted")) {
606 swap_buffers_completion_callback_.Run(std::vector<ui::LatencyInfo>(), 605 swap_buffers_completion_callback_.Run(std::vector<ui::LatencyInfo>());
607 result);
608 return; 606 return;
609 } 607 }
610 swap_buffers_completion_callback_.Run(latency_info, result); 608 swap_buffers_completion_callback_.Run(latency_info);
611 } 609 }
612 } 610 }
613 611
614 void CommandBufferProxyImpl::OnUpdateVSyncParameters(base::TimeTicks timebase, 612 void CommandBufferProxyImpl::OnUpdateVSyncParameters(base::TimeTicks timebase,
615 base::TimeDelta interval) { 613 base::TimeDelta interval) {
616 if (!update_vsync_parameters_completion_callback_.is_null()) 614 if (!update_vsync_parameters_completion_callback_.is_null())
617 update_vsync_parameters_completion_callback_.Run(timebase, interval); 615 update_vsync_parameters_completion_callback_.Run(timebase, interval);
618 } 616 }
619 617
620 } // namespace content 618 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/client/command_buffer_proxy_impl.h ('k') | content/common/gpu/gpu_command_buffer_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698