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 "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 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 uint32 signal_id = next_signal_id_++; | 642 uint32 signal_id = next_signal_id_++; |
643 if (!Send(new GpuCommandBufferMsg_SignalQuery(route_id_, | 643 if (!Send(new GpuCommandBufferMsg_SignalQuery(route_id_, |
644 query, | 644 query, |
645 signal_id))) { | 645 signal_id))) { |
646 return; | 646 return; |
647 } | 647 } |
648 | 648 |
649 signal_tasks_.insert(std::make_pair(signal_id, callback)); | 649 signal_tasks_.insert(std::make_pair(signal_id, callback)); |
650 } | 650 } |
651 | 651 |
652 void CommandBufferProxyImpl::SetSurfaceVisible(bool visible) { | |
653 CheckLock(); | |
654 if (last_state_.error != gpu::error::kNoError) | |
655 return; | |
656 | |
657 Send(new GpuCommandBufferMsg_SetSurfaceVisible(route_id_, visible)); | |
658 } | |
659 | |
660 bool CommandBufferProxyImpl::ProduceFrontBuffer(const gpu::Mailbox& mailbox) { | 652 bool CommandBufferProxyImpl::ProduceFrontBuffer(const gpu::Mailbox& mailbox) { |
661 CheckLock(); | 653 CheckLock(); |
662 if (last_state_.error != gpu::error::kNoError) | 654 if (last_state_.error != gpu::error::kNoError) |
663 return false; | 655 return false; |
664 | 656 |
665 return Send(new GpuCommandBufferMsg_ProduceFrontBuffer(route_id_, mailbox)); | 657 return Send(new GpuCommandBufferMsg_ProduceFrontBuffer(route_id_, mailbox)); |
666 } | 658 } |
667 | 659 |
668 scoped_ptr<media::VideoDecodeAccelerator> | 660 scoped_ptr<media::VideoDecodeAccelerator> |
669 CommandBufferProxyImpl::CreateVideoDecoder() { | 661 CommandBufferProxyImpl::CreateVideoDecoder() { |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 } | 749 } |
758 } | 750 } |
759 | 751 |
760 void CommandBufferProxyImpl::OnUpdateVSyncParameters(base::TimeTicks timebase, | 752 void CommandBufferProxyImpl::OnUpdateVSyncParameters(base::TimeTicks timebase, |
761 base::TimeDelta interval) { | 753 base::TimeDelta interval) { |
762 if (!update_vsync_parameters_completion_callback_.is_null()) | 754 if (!update_vsync_parameters_completion_callback_.is_null()) |
763 update_vsync_parameters_completion_callback_.Run(timebase, interval); | 755 update_vsync_parameters_completion_callback_.Run(timebase, interval); |
764 } | 756 } |
765 | 757 |
766 } // namespace content | 758 } // namespace content |
OLD | NEW |