| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "gpu/command_buffer/service/gl_state_restorer_impl.h" | 5 #include "gpu/command_buffer/service/gl_state_restorer_impl.h" |
| 6 | 6 |
| 7 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 7 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
| 8 #include "gpu/command_buffer/service/query_manager.h" | 8 #include "gpu/command_buffer/service/query_manager.h" |
| 9 | 9 |
| 10 namespace gpu { | 10 namespace gpu { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 void GLStateRestorerImpl::RestoreState(const gl::GLStateRestorer* prev_state) { | 25 void GLStateRestorerImpl::RestoreState(const gl::GLStateRestorer* prev_state) { |
| 26 DCHECK(decoder_.get()); | 26 DCHECK(decoder_.get()); |
| 27 const GLStateRestorerImpl* restorer_impl = | 27 const GLStateRestorerImpl* restorer_impl = |
| 28 static_cast<const GLStateRestorerImpl*>(prev_state); | 28 static_cast<const GLStateRestorerImpl*>(prev_state); |
| 29 | 29 |
| 30 decoder_->RestoreState( | 30 decoder_->RestoreState( |
| 31 restorer_impl ? restorer_impl->GetContextState() : NULL); | 31 restorer_impl ? restorer_impl->GetContextState() : NULL); |
| 32 } | 32 } |
| 33 | 33 |
| 34 void GLStateRestorerImpl::RestoreAllTextureUnitBindings() { | 34 void GLStateRestorerImpl::RestoreAllTextureUnitAndSamplerBindings() { |
| 35 DCHECK(decoder_.get()); | 35 DCHECK(decoder_.get()); |
| 36 decoder_->RestoreAllTextureUnitBindings(NULL); | 36 decoder_->RestoreAllTextureUnitAndSamplerBindings(NULL); |
| 37 } | 37 } |
| 38 | 38 |
| 39 void GLStateRestorerImpl::RestoreActiveTexture() { | 39 void GLStateRestorerImpl::RestoreActiveTexture() { |
| 40 DCHECK(decoder_.get()); | 40 DCHECK(decoder_.get()); |
| 41 decoder_->RestoreActiveTexture(); | 41 decoder_->RestoreActiveTexture(); |
| 42 } | 42 } |
| 43 | 43 |
| 44 void GLStateRestorerImpl::RestoreActiveTextureUnitBinding(unsigned int target) { | 44 void GLStateRestorerImpl::RestoreActiveTextureUnitBinding(unsigned int target) { |
| 45 DCHECK(decoder_.get()); | 45 DCHECK(decoder_.get()); |
| 46 decoder_->RestoreActiveTextureUnitBinding(target); | 46 decoder_->RestoreActiveTextureUnitBinding(target); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 DCHECK(decoder_.get()); | 80 DCHECK(decoder_.get()); |
| 81 decoder_->GetQueryManager()->ResumeQueries(); | 81 decoder_->GetQueryManager()->ResumeQueries(); |
| 82 } | 82 } |
| 83 | 83 |
| 84 const gles2::ContextState* GLStateRestorerImpl::GetContextState() const { | 84 const gles2::ContextState* GLStateRestorerImpl::GetContextState() const { |
| 85 DCHECK(decoder_.get()); | 85 DCHECK(decoder_.get()); |
| 86 return decoder_->GetContextState(); | 86 return decoder_->GetContextState(); |
| 87 } | 87 } |
| 88 | 88 |
| 89 } // namespace gpu | 89 } // namespace gpu |
| OLD | NEW |