Chromium Code Reviews| Index: gpu/command_buffer/service/gles2_cmd_decoder.cc |
| diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| index 25509d8d7ee346ae696b01c6302758a7ad86447d..ea02fab1937b14e1b360fc9d0cdef5dbe7a38793 100644 |
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| @@ -676,6 +676,12 @@ class GLES2DecoderImpl : public GLES2Decoder, |
| bool GenVertexArraysOESHelper(GLsizei n, const GLuint* client_ids); |
| void DeleteVertexArraysOESHelper(GLsizei n, const GLuint* client_ids); |
| + // Callback for completed async uploads. |
| + void AsyncUploadCompleted(uint32 async_token); |
|
reveman
2014/01/22 17:30:04
This is not really a completed upload, it's the pa
|
| + |
| + // Overridden from CommonDecoder |
| + virtual void OnSetAsyncToken(uint32 async_token) OVERRIDE; |
| + |
| // Workarounds |
| void OnFboChanged() const; |
| void OnUseFramebuffer() const; |
| @@ -3547,6 +3553,17 @@ const char* GLES2DecoderImpl::GetCommandName(unsigned int command_id) const { |
| return GetCommonCommandName(static_cast<cmd::CommandId>(command_id)); |
| } |
| +void GLES2DecoderImpl::AsyncUploadCompleted(uint32 async_token) { |
| + engine()->set_async_token(async_token); |
| +} |
| + |
| +void GLES2DecoderImpl::OnSetAsyncToken(uint32 async_token) { |
| + GetAsyncPixelTransferManager()->AsyncRunWhenCompleted( |
| + base::Bind(&GLES2DecoderImpl::AsyncUploadCompleted, |
| + base::Unretained(this), |
| + async_token)); |
| +} |
| + |
| // Decode command with its arguments, and call the corresponding GL function. |
| // Note: args is a pointer to the command buffer. As such, it could be changed |
| // by a (malicious) client at any time, so if validation has to happen, it |