| Index: gpu/command_buffer/service/gl_state_restorer_impl.cc
|
| diff --git a/gpu/command_buffer/service/gl_state_restorer_impl.cc b/gpu/command_buffer/service/gl_state_restorer_impl.cc
|
| index 7b3c5ed384148318cde872d3a1c343ccb488feab..14458c3a6065f2ae043d561502a73dad71e18078 100644
|
| --- a/gpu/command_buffer/service/gl_state_restorer_impl.cc
|
| +++ b/gpu/command_buffer/service/gl_state_restorer_impl.cc
|
| @@ -21,14 +21,17 @@ bool GLStateRestorerImpl::IsInitialized() {
|
| return decoder_->initialized();
|
| }
|
|
|
| -void GLStateRestorerImpl::RestoreState() {
|
| +void GLStateRestorerImpl::RestoreState(gfx::GLStateRestorer* prev_state) {
|
| DCHECK(decoder_.get());
|
| - decoder_->RestoreState();
|
| + GLStateRestorerImpl* restorer_impl =
|
| + static_cast<GLStateRestorerImpl*>(prev_state);
|
| + decoder_->RestoreState(
|
| + restorer_impl ? restorer_impl->GetContextState() : NULL);
|
| }
|
|
|
| void GLStateRestorerImpl::RestoreAllTextureUnitBindings() {
|
| DCHECK(decoder_.get());
|
| - decoder_->RestoreAllTextureUnitBindings();
|
| + decoder_->RestoreAllTextureUnitBindings(NULL);
|
| }
|
|
|
| void GLStateRestorerImpl::RestoreFramebufferBindings() {
|
| @@ -36,4 +39,9 @@ void GLStateRestorerImpl::RestoreFramebufferBindings() {
|
| decoder_->RestoreFramebufferBindings();
|
| }
|
|
|
| +const gles2::ContextState* GLStateRestorerImpl::GetContextState() {
|
| + DCHECK(decoder_.get());
|
| + return decoder_->GetContextState();
|
| +}
|
| +
|
| } // namespace gpu
|
|
|