| 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 // This file contains the ContextState class. | 5 // This file contains the ContextState class. |
| 6 | 6 |
| 7 #ifndef GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ | 7 #ifndef GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ |
| 8 #define GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ | 8 #define GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "gpu/command_buffer/service/gl_utils.h" | 14 #include "gpu/command_buffer/service/gl_utils.h" |
| 15 #include "gpu/command_buffer/service/sampler_manager.h" | 15 #include "gpu/command_buffer/service/sampler_manager.h" |
| 16 #include "gpu/command_buffer/service/texture_manager.h" | 16 #include "gpu/command_buffer/service/texture_manager.h" |
| 17 #include "gpu/command_buffer/service/valuebuffer_manager.h" | |
| 18 #include "gpu/command_buffer/service/vertex_array_manager.h" | 17 #include "gpu/command_buffer/service/vertex_array_manager.h" |
| 19 #include "gpu/command_buffer/service/vertex_attrib_manager.h" | 18 #include "gpu/command_buffer/service/vertex_attrib_manager.h" |
| 20 #include "gpu/gpu_export.h" | 19 #include "gpu/gpu_export.h" |
| 21 | 20 |
| 22 namespace gpu { | 21 namespace gpu { |
| 23 namespace gles2 { | 22 namespace gles2 { |
| 24 | 23 |
| 25 class Buffer; | 24 class Buffer; |
| 26 class ErrorState; | 25 class ErrorState; |
| 27 class ErrorStateClient; | 26 class ErrorStateClient; |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 scoped_refptr<VertexAttribManager> vertex_attrib_manager; | 280 scoped_refptr<VertexAttribManager> vertex_attrib_manager; |
| 282 scoped_refptr<VertexAttribManager> default_vertex_attrib_manager; | 281 scoped_refptr<VertexAttribManager> default_vertex_attrib_manager; |
| 283 | 282 |
| 284 // The program in use by glUseProgram | 283 // The program in use by glUseProgram |
| 285 scoped_refptr<Program> current_program; | 284 scoped_refptr<Program> current_program; |
| 286 | 285 |
| 287 // The currently bound renderbuffer | 286 // The currently bound renderbuffer |
| 288 scoped_refptr<Renderbuffer> bound_renderbuffer; | 287 scoped_refptr<Renderbuffer> bound_renderbuffer; |
| 289 bool bound_renderbuffer_valid; | 288 bool bound_renderbuffer_valid; |
| 290 | 289 |
| 291 // The currently bound valuebuffer | |
| 292 scoped_refptr<Valuebuffer> bound_valuebuffer; | |
| 293 | |
| 294 bool pack_reverse_row_order; | 290 bool pack_reverse_row_order; |
| 295 bool ignore_cached_state; | 291 bool ignore_cached_state; |
| 296 | 292 |
| 297 mutable bool fbo_binding_for_scissor_workaround_dirty; | 293 mutable bool fbo_binding_for_scissor_workaround_dirty; |
| 298 | 294 |
| 299 private: | 295 private: |
| 300 void EnableDisable(GLenum pname, bool enable) const; | 296 void EnableDisable(GLenum pname, bool enable) const; |
| 301 | 297 |
| 302 // If a buffer object is bound to PIXEL_PACK_BUFFER, set all pack parameters | 298 // If a buffer object is bound to PIXEL_PACK_BUFFER, set all pack parameters |
| 303 // user values; otherwise, set them to 0. | 299 // user values; otherwise, set them to 0. |
| 304 void UpdatePackParameters() const; | 300 void UpdatePackParameters() const; |
| 305 // If a buffer object is bound to PIXEL_UNPACK_BUFFER, set all unpack | 301 // If a buffer object is bound to PIXEL_UNPACK_BUFFER, set all unpack |
| 306 // parameters user values; otherwise, set them to 0. | 302 // parameters user values; otherwise, set them to 0. |
| 307 void UpdateUnpackParameters() const; | 303 void UpdateUnpackParameters() const; |
| 308 | 304 |
| 309 void InitStateManual(const ContextState* prev_state) const; | 305 void InitStateManual(const ContextState* prev_state) const; |
| 310 | 306 |
| 311 FeatureInfo* feature_info_; | 307 FeatureInfo* feature_info_; |
| 312 std::unique_ptr<ErrorState> error_state_; | 308 std::unique_ptr<ErrorState> error_state_; |
| 313 }; | 309 }; |
| 314 | 310 |
| 315 } // namespace gles2 | 311 } // namespace gles2 |
| 316 } // namespace gpu | 312 } // namespace gpu |
| 317 | 313 |
| 318 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ | 314 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ |
| 319 | 315 |
| OLD | NEW |