OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "gpu/command_buffer/service/in_process_command_buffer.h" | 5 #include "gpu/command_buffer/service/in_process_command_buffer.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <queue> | 10 #include <queue> |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 return false; | 414 return false; |
415 } | 415 } |
416 *params.capabilities = decoder_->GetCapabilities(); | 416 *params.capabilities = decoder_->GetCapabilities(); |
417 | 417 |
418 decoder_->SetFenceSyncReleaseCallback( | 418 decoder_->SetFenceSyncReleaseCallback( |
419 base::Bind(&InProcessCommandBuffer::FenceSyncReleaseOnGpuThread, | 419 base::Bind(&InProcessCommandBuffer::FenceSyncReleaseOnGpuThread, |
420 base::Unretained(this))); | 420 base::Unretained(this))); |
421 decoder_->SetWaitFenceSyncCallback( | 421 decoder_->SetWaitFenceSyncCallback( |
422 base::Bind(&InProcessCommandBuffer::WaitFenceSyncOnGpuThread, | 422 base::Bind(&InProcessCommandBuffer::WaitFenceSyncOnGpuThread, |
423 base::Unretained(this))); | 423 base::Unretained(this))); |
| 424 decoder_->SetDescheduleUntilFinishedCallback( |
| 425 base::Bind(&InProcessCommandBuffer::DescheduleUntilFinishedOnGpuThread, |
| 426 base::Unretained(this))); |
| 427 decoder_->SetRescheduleAfterFinishedCallback( |
| 428 base::Bind(&InProcessCommandBuffer::RescheduleAfterFinishedOnGpuThread, |
| 429 base::Unretained(this))); |
424 | 430 |
425 image_factory_ = params.image_factory; | 431 image_factory_ = params.image_factory; |
426 | 432 |
427 return true; | 433 return true; |
428 } | 434 } |
429 | 435 |
430 void InProcessCommandBuffer::Destroy() { | 436 void InProcessCommandBuffer::Destroy() { |
431 CheckSequencedThread(); | 437 CheckSequencedThread(); |
432 client_thread_weak_ptr_factory_.InvalidateWeakPtrs(); | 438 client_thread_weak_ptr_factory_.InvalidateWeakPtrs(); |
433 gpu_control_client_ = nullptr; | 439 gpu_control_client_ = nullptr; |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
875 fence_sync_wait_event_.Wait(); | 881 fence_sync_wait_event_.Wait(); |
876 } | 882 } |
877 | 883 |
878 gles2::MailboxManager* mailbox_manager = | 884 gles2::MailboxManager* mailbox_manager = |
879 decoder_->GetContextGroup()->mailbox_manager(); | 885 decoder_->GetContextGroup()->mailbox_manager(); |
880 SyncToken sync_token(namespace_id, 0, command_buffer_id, release); | 886 SyncToken sync_token(namespace_id, 0, command_buffer_id, release); |
881 mailbox_manager->PullTextureUpdates(sync_token); | 887 mailbox_manager->PullTextureUpdates(sync_token); |
882 return true; | 888 return true; |
883 } | 889 } |
884 | 890 |
| 891 void InProcessCommandBuffer::DescheduleUntilFinishedOnGpuThread() { |
| 892 NOTIMPLEMENTED(); |
| 893 } |
| 894 |
| 895 void InProcessCommandBuffer::RescheduleAfterFinishedOnGpuThread() { |
| 896 NOTIMPLEMENTED(); |
| 897 } |
| 898 |
885 void InProcessCommandBuffer::SignalSyncTokenOnGpuThread( | 899 void InProcessCommandBuffer::SignalSyncTokenOnGpuThread( |
886 const SyncToken& sync_token, const base::Closure& callback) { | 900 const SyncToken& sync_token, const base::Closure& callback) { |
887 gpu::SyncPointManager* sync_point_manager = service_->sync_point_manager(); | 901 gpu::SyncPointManager* sync_point_manager = service_->sync_point_manager(); |
888 DCHECK(sync_point_manager); | 902 DCHECK(sync_point_manager); |
889 | 903 |
890 scoped_refptr<gpu::SyncPointClientState> release_state = | 904 scoped_refptr<gpu::SyncPointClientState> release_state = |
891 sync_point_manager->GetSyncPointClientState( | 905 sync_point_manager->GetSyncPointClientState( |
892 sync_token.namespace_id(), sync_token.command_buffer_id()); | 906 sync_token.namespace_id(), sync_token.command_buffer_id()); |
893 | 907 |
894 if (!release_state) { | 908 if (!release_state) { |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1059 framebuffer_completeness_cache_ = | 1073 framebuffer_completeness_cache_ = |
1060 new gpu::gles2::FramebufferCompletenessCache; | 1074 new gpu::gles2::FramebufferCompletenessCache; |
1061 return framebuffer_completeness_cache_; | 1075 return framebuffer_completeness_cache_; |
1062 } | 1076 } |
1063 | 1077 |
1064 SyncPointManager* GpuInProcessThread::sync_point_manager() { | 1078 SyncPointManager* GpuInProcessThread::sync_point_manager() { |
1065 return sync_point_manager_; | 1079 return sync_point_manager_; |
1066 } | 1080 } |
1067 | 1081 |
1068 } // namespace gpu | 1082 } // namespace gpu |
OLD | NEW |