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

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: fix ozone demo 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) {
602 if (!swap_buffers_completion_callback_.is_null()) { 603 if (!swap_buffers_completion_callback_.is_null()) {
603 if (!ui::LatencyInfo::Verify( 604 if (!ui::LatencyInfo::Verify(
604 latency_info, "CommandBufferProxyImpl::OnSwapBuffersCompleted")) { 605 latency_info, "CommandBufferProxyImpl::OnSwapBuffersCompleted")) {
605 swap_buffers_completion_callback_.Run(std::vector<ui::LatencyInfo>()); 606 swap_buffers_completion_callback_.Run(std::vector<ui::LatencyInfo>(),
607 result);
606 return; 608 return;
607 } 609 }
608 swap_buffers_completion_callback_.Run(latency_info); 610 swap_buffers_completion_callback_.Run(latency_info, result);
609 } 611 }
610 } 612 }
611 613
612 void CommandBufferProxyImpl::OnUpdateVSyncParameters(base::TimeTicks timebase, 614 void CommandBufferProxyImpl::OnUpdateVSyncParameters(base::TimeTicks timebase,
613 base::TimeDelta interval) { 615 base::TimeDelta interval) {
614 if (!update_vsync_parameters_completion_callback_.is_null()) 616 if (!update_vsync_parameters_completion_callback_.is_null())
615 update_vsync_parameters_completion_callback_.Run(timebase, interval); 617 update_vsync_parameters_completion_callback_.Run(timebase, interval);
616 } 618 }
617 619
618 } // namespace content 620 } // 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