Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(384)

Side by Side Diff: gpu/command_buffer/service/async_pixel_transfer_manager_share_group.cc

Issue 116863003: gpu: Reuse transfer buffers more aggresively (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Unset texture and texture_ref after deleting Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 return total_texture_upload_time; 527 return total_texture_upload_time;
528 } 528 }
529 529
530 void AsyncPixelTransferManagerShareGroup::ProcessMorePendingTransfers() { 530 void AsyncPixelTransferManagerShareGroup::ProcessMorePendingTransfers() {
531 } 531 }
532 532
533 bool AsyncPixelTransferManagerShareGroup::NeedsProcessMorePendingTransfers() { 533 bool AsyncPixelTransferManagerShareGroup::NeedsProcessMorePendingTransfers() {
534 return false; 534 return false;
535 } 535 }
536 536
537 void AsyncPixelTransferManagerShareGroup::WaitAllAsyncTexImage2D() {
538 if (shared_state_.pending_allocations.empty())
539 return;
540
541 AsyncPixelTransferDelegateShareGroup* delegate =
542 shared_state_.pending_allocations.back().get();
543 if (delegate)
544 delegate->WaitForTransferCompletion();
545 }
546
537 AsyncPixelTransferDelegate* 547 AsyncPixelTransferDelegate*
538 AsyncPixelTransferManagerShareGroup::CreatePixelTransferDelegateImpl( 548 AsyncPixelTransferManagerShareGroup::CreatePixelTransferDelegateImpl(
539 gles2::TextureRef* ref, 549 gles2::TextureRef* ref,
540 const AsyncTexImage2DParams& define_params) { 550 const AsyncTexImage2DParams& define_params) {
541 return new AsyncPixelTransferDelegateShareGroup( 551 return new AsyncPixelTransferDelegateShareGroup(
542 &shared_state_, ref->service_id(), define_params); 552 &shared_state_, ref->service_id(), define_params);
543 } 553 }
544 554
545 } // namespace gpu 555 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698