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

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

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/client/cmd_buffer_helper.h ('k') | gpu/command_buffer/client/fenced_allocator.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.h
diff --git a/gpu/command_buffer/client/fenced_allocator.h b/gpu/command_buffer/client/fenced_allocator.h
index bb5c55170ab25e2766a4804c762a51ee00e8c2f3..77fadc3dd8fc9e517a28a4742d82a8f708b69e56 100644
--- a/gpu/command_buffer/client/fenced_allocator.h
+++ b/gpu/command_buffer/client/fenced_allocator.h
@@ -9,6 +9,7 @@
#include <vector>
+#include "base/bind.h"
#include "base/logging.h"
#include "gpu/command_buffer/common/types.h"
#include "gpu/gpu_export.h"
@@ -35,7 +36,8 @@ class GPU_EXPORT FencedAllocator {
// Creates a FencedAllocator. Note that the size of the buffer is passed, but
// not its base address: everything is handled as offsets into the buffer.
FencedAllocator(unsigned int size,
- CommandBufferHelper *helper);
+ CommandBufferHelper *helper,
+ const base::Closure& poll_callback);
~FencedAllocator();
@@ -136,6 +138,7 @@ class GPU_EXPORT FencedAllocator {
Offset AllocInBlock(BlockIndex index, unsigned int size);
CommandBufferHelper *helper_;
+ base::Closure poll_callback_;
Container blocks_;
size_t bytes_in_use_;
@@ -148,8 +151,9 @@ class FencedAllocatorWrapper {
public:
FencedAllocatorWrapper(unsigned int size,
CommandBufferHelper* helper,
+ const base::Closure& poll_callback,
void* base)
- : allocator_(size, helper),
+ : allocator_(size, helper, poll_callback),
base_(base) { }
// Allocates a block of memory. If the buffer is out of directly available
« no previous file with comments | « gpu/command_buffer/client/cmd_buffer_helper.h ('k') | gpu/command_buffer/client/fenced_allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698