| 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 bc87b967863c8ab49f0b9fae775a623c33ce7d41..a8a7c1c7c929be65c9115b2d3af2eff5773937cf 100644
|
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| @@ -566,6 +566,9 @@ class GLES2DecoderImpl : public GLES2Decoder,
|
| virtual void RestoreFramebufferBindings() const OVERRIDE;
|
| virtual void RestoreTextureState(unsigned service_id) const OVERRIDE;
|
|
|
| + virtual void ClearAllAttributes() const OVERRIDE;
|
| + virtual void RestoreAllAttributes() const OVERRIDE;
|
| +
|
| virtual QueryManager* GetQueryManager() OVERRIDE {
|
| return query_manager_.get();
|
| }
|
| @@ -3784,6 +3787,20 @@ void GLES2DecoderImpl::RestoreTextureState(unsigned service_id) const {
|
| }
|
| }
|
|
|
| +void GLES2DecoderImpl::ClearAllAttributes() const {
|
| + for (uint32 i = 0; i < group_->max_vertex_attribs(); ++i) {
|
| + if (i != 0) // Never disable attribute 0
|
| + glDisableVertexAttribArray(i);
|
| + if(features().angle_instanced_arrays)
|
| + glVertexAttribDivisorANGLE(i, 0);
|
| + }
|
| +}
|
| +
|
| +void GLES2DecoderImpl::RestoreAllAttributes() const {
|
| + for (uint32 i = 0; i < group_->max_vertex_attribs(); ++i)
|
| + RestoreAttribute(i);
|
| +}
|
| +
|
| void GLES2DecoderImpl::OnFboChanged() const {
|
| if (workarounds().restore_scissor_on_fbo_change)
|
| state_.fbo_binding_for_scissor_workaround_dirty_ = true;
|
|
|