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 | 8 |
9 namespace gpu { | 9 namespace gpu { |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 static_cast<const GLStateRestorerImpl*>(prev_state); | 27 static_cast<const GLStateRestorerImpl*>(prev_state); |
28 decoder_->RestoreState( | 28 decoder_->RestoreState( |
29 restorer_impl ? restorer_impl->GetContextState() : NULL); | 29 restorer_impl ? restorer_impl->GetContextState() : NULL); |
30 } | 30 } |
31 | 31 |
32 void GLStateRestorerImpl::RestoreAllTextureUnitBindings() { | 32 void GLStateRestorerImpl::RestoreAllTextureUnitBindings() { |
33 DCHECK(decoder_.get()); | 33 DCHECK(decoder_.get()); |
34 decoder_->RestoreAllTextureUnitBindings(NULL); | 34 decoder_->RestoreAllTextureUnitBindings(NULL); |
35 } | 35 } |
36 | 36 |
| 37 void GLStateRestorerImpl::RestoreActiveTextureUnitBinding(unsigned int target) { |
| 38 DCHECK(decoder_.get()); |
| 39 decoder_->RestoreActiveTextureUnitBinding(target); |
| 40 } |
| 41 |
37 void GLStateRestorerImpl::RestoreFramebufferBindings() { | 42 void GLStateRestorerImpl::RestoreFramebufferBindings() { |
38 DCHECK(decoder_.get()); | 43 DCHECK(decoder_.get()); |
39 decoder_->RestoreFramebufferBindings(); | 44 decoder_->RestoreFramebufferBindings(); |
40 } | 45 } |
41 | 46 |
42 const gles2::ContextState* GLStateRestorerImpl::GetContextState() const { | 47 const gles2::ContextState* GLStateRestorerImpl::GetContextState() const { |
43 DCHECK(decoder_.get()); | 48 DCHECK(decoder_.get()); |
44 return decoder_->GetContextState(); | 49 return decoder_->GetContextState(); |
45 } | 50 } |
46 | 51 |
47 } // namespace gpu | 52 } // namespace gpu |
OLD | NEW |