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

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

Issue 1084173004: Adding status to swap complete (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: copy/paste error Created 5 years, 7 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 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 if (last_state_.error == gpu::error::kNoError) 590 if (last_state_.error == gpu::error::kNoError)
591 shared_state()->Read(&last_state_); 591 shared_state()->Read(&last_state_);
592 } 592 }
593 593
594 gpu::CommandBufferSharedState* CommandBufferProxyImpl::shared_state() const { 594 gpu::CommandBufferSharedState* CommandBufferProxyImpl::shared_state() const {
595 return reinterpret_cast<gpu::CommandBufferSharedState*>( 595 return reinterpret_cast<gpu::CommandBufferSharedState*>(
596 shared_state_shm_->memory()); 596 shared_state_shm_->memory());
597 } 597 }
598 598
599 void CommandBufferProxyImpl::OnSwapBuffersCompleted( 599 void CommandBufferProxyImpl::OnSwapBuffersCompleted(
600 const std::vector<ui::LatencyInfo>& latency_info) { 600 const std::vector<ui::LatencyInfo>& latency_info,
601 gfx::SwapResult result) {
601 if (!swap_buffers_completion_callback_.is_null()) { 602 if (!swap_buffers_completion_callback_.is_null()) {
602 if (!ui::LatencyInfo::Verify( 603 if (!ui::LatencyInfo::Verify(
603 latency_info, "CommandBufferProxyImpl::OnSwapBuffersCompleted")) { 604 latency_info, "CommandBufferProxyImpl::OnSwapBuffersCompleted")) {
604 swap_buffers_completion_callback_.Run(std::vector<ui::LatencyInfo>()); 605 swap_buffers_completion_callback_.Run(std::vector<ui::LatencyInfo>(),
606 result);
605 return; 607 return;
606 } 608 }
607 swap_buffers_completion_callback_.Run(latency_info); 609 swap_buffers_completion_callback_.Run(latency_info, result);
608 } 610 }
609 } 611 }
610 612
611 void CommandBufferProxyImpl::OnUpdateVSyncParameters(base::TimeTicks timebase, 613 void CommandBufferProxyImpl::OnUpdateVSyncParameters(base::TimeTicks timebase,
612 base::TimeDelta interval) { 614 base::TimeDelta interval) {
613 if (!update_vsync_parameters_completion_callback_.is_null()) 615 if (!update_vsync_parameters_completion_callback_.is_null())
614 update_vsync_parameters_completion_callback_.Run(timebase, interval); 616 update_vsync_parameters_completion_callback_.Run(timebase, interval);
615 } 617 }
616 618
617 } // namespace content 619 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698