summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/client/fenced_allocator.h
diff options
context:
space:
mode:
authorcreis@chromium.org <creis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-28 18:00:29 +0000
committercreis@chromium.org <creis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-28 18:00:29 +0000
commit3019153509d9484d02d1bbc1652a03565d342ae9 (patch)
tree6ec4d4312d5c92936391942702648be2ce6f808d /gpu/command_buffer/client/fenced_allocator.h
parent3a5d8d9d9c97dd66a19f8f740a3399802f9a499e (diff)
downloadchromium_src-3019153509d9484d02d1bbc1652a03565d342ae9.zip
chromium_src-3019153509d9484d02d1bbc1652a03565d342ae9.tar.gz
chromium_src-3019153509d9484d02d1bbc1652a03565d342ae9.tar.bz2
Revert 260177 "By keeping track of transfer buffer usage (both s..."
Caused a heap-use-after-free in GLES2DecoderManualInitTest.AsyncPixelTransfers on Linux ASan+LSan Tests (1): http://build.chromium.org/p/chromium.memory/builders/Linux%20ASan%2BLSan%20Tests%20%281%29/builds/863 > By keeping track of transfer buffer usage (both sync and async), it is > possible to reuse an existing transfer buffer earlier than it is today. > > For synchronous uploads, this is done by inserting tokens marking a > buffer's last usage. If such a token has passed, the buffer can be > reused. > > For asynchronous uploads, this is done by adding an internal async > upload token to the GLES2Implementation and GLES2CmdDecoderImpl that > enumerates all asynchronous uploads. When an upload is completed, the > token is synchronized with the client which then can free the memory > associated with the async token. > > The fenced allocator and mapped memory manager gets a callback that is > used to allow fenced allocator to make the user, in this case > GLES2Implementation, poll the current async upload token and free any > associated memory. > > BUG=328808 > > Review URL: https://codereview.chromium.org/116863003 TBR=jadahl@opera.com Review URL: https://codereview.chromium.org/216673006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260193 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/client/fenced_allocator.h')
-rw-r--r--gpu/command_buffer/client/fenced_allocator.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/gpu/command_buffer/client/fenced_allocator.h b/gpu/command_buffer/client/fenced_allocator.h
index 77fadc3..bb5c551 100644
--- a/gpu/command_buffer/client/fenced_allocator.h
+++ b/gpu/command_buffer/client/fenced_allocator.h
@@ -9,7 +9,6 @@
#include <vector>
-#include "base/bind.h"
#include "base/logging.h"
#include "gpu/command_buffer/common/types.h"
#include "gpu/gpu_export.h"
@@ -36,8 +35,7 @@ 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,
- const base::Closure& poll_callback);
+ CommandBufferHelper *helper);
~FencedAllocator();
@@ -138,7 +136,6 @@ class GPU_EXPORT FencedAllocator {
Offset AllocInBlock(BlockIndex index, unsigned int size);
CommandBufferHelper *helper_;
- base::Closure poll_callback_;
Container blocks_;
size_t bytes_in_use_;
@@ -151,9 +148,8 @@ class FencedAllocatorWrapper {
public:
FencedAllocatorWrapper(unsigned int size,
CommandBufferHelper* helper,
- const base::Closure& poll_callback,
void* base)
- : allocator_(size, helper, poll_callback),
+ : allocator_(size, helper),
base_(base) { }
// Allocates a block of memory. If the buffer is out of directly available