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_share_group.h" | 5 #include "gpu/command_buffer/service/async_pixel_transfer_manager_share_group.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 return total_texture_upload_time; | 566 return total_texture_upload_time; |
567 } | 567 } |
568 | 568 |
569 void AsyncPixelTransferManagerShareGroup::ProcessMorePendingTransfers() { | 569 void AsyncPixelTransferManagerShareGroup::ProcessMorePendingTransfers() { |
570 } | 570 } |
571 | 571 |
572 bool AsyncPixelTransferManagerShareGroup::NeedsProcessMorePendingTransfers() { | 572 bool AsyncPixelTransferManagerShareGroup::NeedsProcessMorePendingTransfers() { |
573 return false; | 573 return false; |
574 } | 574 } |
575 | 575 |
| 576 void AsyncPixelTransferManagerShareGroup::WaitAllAsyncTexImage2D() { |
| 577 if (shared_state_.pending_allocations.empty()) |
| 578 return; |
| 579 |
| 580 AsyncPixelTransferDelegateShareGroup* delegate = |
| 581 shared_state_.pending_allocations.back().get(); |
| 582 if (delegate) |
| 583 delegate->WaitForTransferCompletion(); |
| 584 } |
| 585 |
576 AsyncPixelTransferDelegate* | 586 AsyncPixelTransferDelegate* |
577 AsyncPixelTransferManagerShareGroup::CreatePixelTransferDelegateImpl( | 587 AsyncPixelTransferManagerShareGroup::CreatePixelTransferDelegateImpl( |
578 gles2::TextureRef* ref, | 588 gles2::TextureRef* ref, |
579 const AsyncTexImage2DParams& define_params) { | 589 const AsyncTexImage2DParams& define_params) { |
580 return new AsyncPixelTransferDelegateShareGroup( | 590 return new AsyncPixelTransferDelegateShareGroup( |
581 &shared_state_, ref->service_id(), define_params); | 591 &shared_state_, ref->service_id(), define_params); |
582 } | 592 } |
583 | 593 |
584 } // namespace gpu | 594 } // namespace gpu |
OLD | NEW |