| 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 8d50037f4045bab1eb4c1846517e321c04c880cf..6deb8374541e5f0f9dbdd85a26433914af716269 100644
|
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| @@ -948,6 +948,8 @@ class GLES2DecoderImpl : public GLES2Decoder,
|
|
|
| void DoDrawBuffersEXT(GLsizei count, const GLenum* bufs);
|
|
|
| + void DoLoseContextCHROMIUM(GLenum current, GLenum other);
|
| +
|
| // Creates a Program for the given program.
|
| Program* CreateProgram(
|
| GLuint client_id, GLuint service_id) {
|
| @@ -1716,7 +1718,9 @@ class GLES2DecoderImpl : public GLES2Decoder,
|
| // Backbuffer attachments that are currently undefined.
|
| uint32 backbuffer_needs_clear_bits_;
|
|
|
| - // The current decoder error.
|
| + // The current decoder error communicates the decoder error through command
|
| + // processing functions that do not return the error value. Should be set only
|
| + // if not returning an error.
|
| error::Error current_decoder_error_;
|
|
|
| bool use_shader_translator_;
|
| @@ -9444,23 +9448,6 @@ void GLES2DecoderImpl::LoseContext(uint32 reset_status) {
|
| current_decoder_error_ = error::kLostContext;
|
| }
|
|
|
| -error::Error GLES2DecoderImpl::HandleLoseContextCHROMIUM(
|
| - uint32 immediate_data_size, const cmds::LoseContextCHROMIUM& c) {
|
| - GLenum current = static_cast<GLenum>(c.current);
|
| - GLenum other = static_cast<GLenum>(c.other);
|
| - if (!validators_->reset_status.IsValid(current)) {
|
| - LOCAL_SET_GL_ERROR_INVALID_ENUM(
|
| - "glLoseContextCHROMIUM", current, "current");
|
| - }
|
| - if (!validators_->reset_status.IsValid(other)) {
|
| - LOCAL_SET_GL_ERROR_INVALID_ENUM("glLoseContextCHROMIUM", other, "other");
|
| - }
|
| - group_->LoseContexts(other);
|
| - reset_status_ = current;
|
| - current_decoder_error_ = error::kLostContext;
|
| - return error::kLostContext;
|
| -}
|
| -
|
| error::Error GLES2DecoderImpl::HandleInsertSyncPointCHROMIUM(
|
| uint32 immediate_data_size, const cmds::InsertSyncPointCHROMIUM& c) {
|
| return error::kUnknownCommand;
|
| @@ -10458,6 +10445,12 @@ void GLES2DecoderImpl::DoDrawBuffersEXT(
|
| }
|
| }
|
|
|
| +void GLES2DecoderImpl::DoLoseContextCHROMIUM(GLenum current, GLenum other) {
|
| + group_->LoseContexts(other);
|
| + reset_status_ = current;
|
| + current_decoder_error_ = error::kLostContext;
|
| +}
|
| +
|
| bool GLES2DecoderImpl::ValidateAsyncTransfer(
|
| const char* function_name,
|
| TextureRef* texture_ref,
|
|
|