| 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/context_state.h" | 5 #include "gpu/command_buffer/service/context_state.h" |
| 6 | 6 |
| 7 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 7 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
| 8 #include "gpu/command_buffer/service/buffer_manager.h" | 8 #include "gpu/command_buffer/service/buffer_manager.h" |
| 9 #include "gpu/command_buffer/service/error_state.h" | 9 #include "gpu/command_buffer/service/error_state.h" |
| 10 #include "gpu/command_buffer/service/framebuffer_manager.h" | 10 #include "gpu/command_buffer/service/framebuffer_manager.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 } // anonymous namespace. | 49 } // anonymous namespace. |
| 50 | 50 |
| 51 TextureUnit::TextureUnit() | 51 TextureUnit::TextureUnit() |
| 52 : bind_target(GL_TEXTURE_2D) { | 52 : bind_target(GL_TEXTURE_2D) { |
| 53 } | 53 } |
| 54 | 54 |
| 55 TextureUnit::~TextureUnit() { | 55 TextureUnit::~TextureUnit() { |
| 56 } | 56 } |
| 57 | 57 |
| 58 ContextState::ContextState(FeatureInfo* feature_info, Logger* logger) | 58 ContextState::ContextState(FeatureInfo* feature_info, |
| 59 ErrorStateClient* error_state_client, |
| 60 Logger* logger) |
| 59 : active_texture_unit(0), | 61 : active_texture_unit(0), |
| 60 pack_reverse_row_order(false), | 62 pack_reverse_row_order(false), |
| 61 fbo_binding_for_scissor_workaround_dirty_(false), | 63 fbo_binding_for_scissor_workaround_dirty_(false), |
| 62 feature_info_(feature_info), | 64 feature_info_(feature_info), |
| 63 error_state_(ErrorState::Create(logger)) { | 65 error_state_(ErrorState::Create(error_state_client, logger)) { |
| 64 Initialize(); | 66 Initialize(); |
| 65 } | 67 } |
| 66 | 68 |
| 67 ContextState::~ContextState() { | 69 ContextState::~ContextState() { |
| 68 } | 70 } |
| 69 | 71 |
| 70 void ContextState::RestoreTextureUnitBindings( | 72 void ContextState::RestoreTextureUnitBindings( |
| 71 GLuint unit, const ContextState* prev_state) const { | 73 GLuint unit, const ContextState* prev_state) const { |
| 72 DCHECK_LT(unit, texture_units.size()); | 74 DCHECK_LT(unit, texture_units.size()); |
| 73 const TextureUnit& texture_unit = texture_units[unit]; | 75 const TextureUnit& texture_unit = texture_units[unit]; |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 | 205 |
| 204 // Include the auto-generated part of this file. We split this because it means | 206 // Include the auto-generated part of this file. We split this because it means |
| 205 // we can easily edit the non-auto generated parts right here in this file | 207 // we can easily edit the non-auto generated parts right here in this file |
| 206 // instead of having to edit some template or the code generator. | 208 // instead of having to edit some template or the code generator. |
| 207 #include "gpu/command_buffer/service/context_state_impl_autogen.h" | 209 #include "gpu/command_buffer/service/context_state_impl_autogen.h" |
| 208 | 210 |
| 209 } // namespace gles2 | 211 } // namespace gles2 |
| 210 } // namespace gpu | 212 } // namespace gpu |
| 211 | 213 |
| 212 | 214 |
| OLD | NEW |