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 <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 const int32_t release_stream_id = sync_token->extra_data_field(); | 613 const int32_t release_stream_id = sync_token->extra_data_field(); |
614 if (release_stream_id == 0) | 614 if (release_stream_id == 0) |
615 return false; | 615 return false; |
616 | 616 |
617 if (release_stream_id != stream_id_) | 617 if (release_stream_id != stream_id_) |
618 channel_->FlushPendingStream(release_stream_id); | 618 channel_->FlushPendingStream(release_stream_id); |
619 | 619 |
620 return true; | 620 return true; |
621 } | 621 } |
622 | 622 |
623 uint32_t CommandBufferProxyImpl::InsertSyncPoint() { | |
624 CheckLock(); | |
625 NOTREACHED(); | |
626 return 0; | |
627 } | |
628 | |
629 uint32_t CommandBufferProxyImpl::InsertFutureSyncPoint() { | |
630 CheckLock(); | |
631 NOTREACHED(); | |
632 return 0; | |
633 } | |
634 | |
635 void CommandBufferProxyImpl::RetireSyncPoint(uint32_t sync_point) { | |
636 CheckLock(); | |
637 NOTREACHED(); | |
638 } | |
639 | |
640 void CommandBufferProxyImpl::SignalSyncPoint(uint32_t sync_point, | |
641 const base::Closure& callback) { | |
642 CheckLock(); | |
643 NOTREACHED(); | |
644 } | |
645 | |
646 void CommandBufferProxyImpl::SignalQuery(uint32_t query, | 623 void CommandBufferProxyImpl::SignalQuery(uint32_t query, |
647 const base::Closure& callback) { | 624 const base::Closure& callback) { |
648 CheckLock(); | 625 CheckLock(); |
649 if (last_state_.error != gpu::error::kNoError) | 626 if (last_state_.error != gpu::error::kNoError) |
650 return; | 627 return; |
651 | 628 |
652 // Signal identifiers are hidden, so nobody outside of this class will see | 629 // Signal identifiers are hidden, so nobody outside of this class will see |
653 // them. (And thus, they cannot save them.) The IDs themselves only last | 630 // them. (And thus, they cannot save them.) The IDs themselves only last |
654 // until the callback is invoked, which will happen as soon as the GPU | 631 // until the callback is invoked, which will happen as soon as the GPU |
655 // catches upwith the command buffer. | 632 // catches upwith the command buffer. |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 } | 767 } |
791 | 768 |
792 void CommandBufferProxyImpl::InvalidGpuReplyOnClientThread() { | 769 void CommandBufferProxyImpl::InvalidGpuReplyOnClientThread() { |
793 scoped_ptr<base::AutoLock> lock; | 770 scoped_ptr<base::AutoLock> lock; |
794 if (lock_) | 771 if (lock_) |
795 lock.reset(new base::AutoLock(*lock_)); | 772 lock.reset(new base::AutoLock(*lock_)); |
796 OnDestroyed(gpu::error::kInvalidGpuMessage, gpu::error::kLostContext); | 773 OnDestroyed(gpu::error::kInvalidGpuMessage, gpu::error::kLostContext); |
797 } | 774 } |
798 | 775 |
799 } // namespace content | 776 } // namespace content |
OLD | NEW |