summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/client/cmd_buffer_helper.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/cmd_buffer_helper.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/cmd_buffer_helper.h')
-rw-r--r--gpu/command_buffer/client/cmd_buffer_helper.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/gpu/command_buffer/client/cmd_buffer_helper.h b/gpu/command_buffer/client/cmd_buffer_helper.h
index a2de5ac..49230b4 100644
--- a/gpu/command_buffer/client/cmd_buffer_helper.h
+++ b/gpu/command_buffer/client/cmd_buffer_helper.h
@@ -84,15 +84,6 @@ class GPU_EXPORT CommandBufferHelper {
// shutdown.
int32 InsertToken();
- // Returns true if the token has passed.
- // Parameters:
- // the value of the token to check whether it has passed
- bool HasTokenPassed(int32 token) const {
- if (token > token_)
- return true; // we wrapped
- return last_token_read() >= token;
- }
-
// Waits until the token of a particular value has passed through the command
// stream (i.e. commands inserted before that token have been executed).
// NOTE: This will call Flush if it needs to block.