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

Unified Diff: gpu/command_buffer/client/fenced_allocator.cc

Issue 1186393004: gpu: Remove async texture uploads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/client/fenced_allocator.h ('k') | gpu/command_buffer/client/fenced_allocator_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/fenced_allocator.cc
diff --git a/gpu/command_buffer/client/fenced_allocator.cc b/gpu/command_buffer/client/fenced_allocator.cc
index bb898867e07bf49bf8a8d7010145da90239ba118..726fe7dafd3a311ba9e45bcad554ca43ed676aa2 100644
--- a/gpu/command_buffer/client/fenced_allocator.cc
+++ b/gpu/command_buffer/client/fenced_allocator.cc
@@ -32,12 +32,8 @@ const FencedAllocator::Offset FencedAllocator::kInvalidOffset;
const unsigned int FencedAllocator::kAllocAlignment;
#endif
-FencedAllocator::FencedAllocator(unsigned int size,
- CommandBufferHelper* helper,
- const base::Closure& poll_callback)
- : helper_(helper),
- poll_callback_(poll_callback),
- bytes_in_use_(0) {
+FencedAllocator::FencedAllocator(unsigned int size, CommandBufferHelper* helper)
+ : helper_(helper), bytes_in_use_(0) {
Block block = { FREE, 0, RoundDown(size), kUnusedToken };
blocks_.push_back(block);
}
@@ -216,9 +212,6 @@ FencedAllocator::BlockIndex FencedAllocator::WaitForTokenAndFreeBlock(
// Frees any blocks pending a token for which the token has been read.
void FencedAllocator::FreeUnused() {
- // Free any potential blocks that has its lifetime handled outside.
- poll_callback_.Run();
-
for (unsigned int i = 0; i < blocks_.size();) {
Block& block = blocks_[i];
if (block.state == FREE_PENDING_TOKEN &&
« no previous file with comments | « gpu/command_buffer/client/fenced_allocator.h ('k') | gpu/command_buffer/client/fenced_allocator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698