Index: gpu/command_buffer/service/texture_manager.cc |
diff --git a/gpu/command_buffer/service/texture_manager.cc b/gpu/command_buffer/service/texture_manager.cc |
index 104cadd9d0775f13a847f589dfbdc5ee6ba6dc2d..7357e9b0753adc39d290ef7c28c984ff499748df 100644 |
--- a/gpu/command_buffer/service/texture_manager.cc |
+++ b/gpu/command_buffer/service/texture_manager.cc |
@@ -1216,17 +1216,19 @@ void TextureManager::BindFinishedAsyncPixelTransfers( |
// Remove finished transfers from the list, while |
// marking whether texture unit 0 or frame_buffer status is dirty. |
- while(!pending_async_transfers_.empty()) { |
- PendingAsyncTransfer state_info = pending_async_transfers_.front(); |
+ PendingAsyncTransferList::iterator iter = pending_async_transfers_.begin(); |
+ while (iter != pending_async_transfers_.end()) { |
epenner
2013/03/08 21:44:57
I think this makes this more expensive right? Is i
reveman
2013/03/12 00:31:42
yes, but I'm pretty sure the number of pending upl
|
+ PendingAsyncTransfer state_info = *iter; |
if (!state_info.first.get()) { |
// The AsyncState is owned by the Texture. So if the |
// async state is deleted, so is the Texture. |
- pending_async_transfers_.pop_front(); |
+ pending_async_transfers_.erase(iter++); |
greggman
2013/03/08 21:06:21
this is not the correct way to erase in the stl is
reveman
2013/03/12 00:31:42
changed to that. seem to be a mix in chromium but
|
+ continue; |
+ } |
+ if (state_info.first->TransferIsInProgress()) { |
+ iter++; |
greggman
2013/03/08 21:06:21
this should be ++iter no?
reveman
2013/03/12 00:31:42
Done. I guess that's a bit more efficient.
|
continue; |
} |
- // Terminate early, as all transfers finish in order. |
- if (state_info.first->TransferIsInProgress()) |
- break; |
// If the transfer is finished, bind it to the texture, |
// update the Texture, and remove it from pending list. |
*texture_dirty = true; |
@@ -1246,7 +1248,7 @@ void TextureManager::BindFinishedAsyncPixelTransfers( |
tex_define_params.format, |
tex_define_params.type, |
true); // cleared |
- pending_async_transfers_.pop_front(); |
+ pending_async_transfers_.erase(iter++); |
greggman
2013/03/08 21:06:21
same as above
reveman
2013/03/12 00:31:42
Done.
|
} |
} |