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/async_pixel_transfer_manager_egl.h" | 5 #include "gpu/command_buffer/service/async_pixel_transfer_manager_egl.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 return total_texture_upload_time; | 722 return total_texture_upload_time; |
723 } | 723 } |
724 | 724 |
725 void AsyncPixelTransferManagerEGL::ProcessMorePendingTransfers() { | 725 void AsyncPixelTransferManagerEGL::ProcessMorePendingTransfers() { |
726 } | 726 } |
727 | 727 |
728 bool AsyncPixelTransferManagerEGL::NeedsProcessMorePendingTransfers() { | 728 bool AsyncPixelTransferManagerEGL::NeedsProcessMorePendingTransfers() { |
729 return false; | 729 return false; |
730 } | 730 } |
731 | 731 |
732 void AsyncPixelTransferManagerEGL::WaitAllAsyncTexImage2D() { | |
733 if (shared_state_.pending_allocations.empty()) | |
734 return; | |
735 | |
736 AsyncPixelTransferDelegateEGL* delegate = | |
737 shared_state_.pending_allocations.back().get(); | |
738 if (delegate) | |
739 delegate->WaitForTransferCompletion(); | |
740 } | |
741 | |
742 AsyncPixelTransferDelegate* | 732 AsyncPixelTransferDelegate* |
743 AsyncPixelTransferManagerEGL::CreatePixelTransferDelegateImpl( | 733 AsyncPixelTransferManagerEGL::CreatePixelTransferDelegateImpl( |
744 gles2::TextureRef* ref, | 734 gles2::TextureRef* ref, |
745 const AsyncTexImage2DParams& define_params) { | 735 const AsyncTexImage2DParams& define_params) { |
746 return new AsyncPixelTransferDelegateEGL( | 736 return new AsyncPixelTransferDelegateEGL( |
747 &shared_state_, ref->service_id(), define_params); | 737 &shared_state_, ref->service_id(), define_params); |
748 } | 738 } |
749 | 739 |
750 } // namespace gpu | 740 } // namespace gpu |
OLD | NEW |