| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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 #ifndef GPU_COMMAND_BUFFER_SERVICE_TRANSFORM_FEEDBACK_MANAGER_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_TRANSFORM_FEEDBACK_MANAGER_H_ |
| 6 #define GPU_COMMAND_BUFFER_SERVICE_TRANSFORM_FEEDBACK_MANAGER_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_TRANSFORM_FEEDBACK_MANAGER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 // Creates a TransformFeedback from the given client/service IDs and | 91 // Creates a TransformFeedback from the given client/service IDs and |
| 92 // insert it into the list. | 92 // insert it into the list. |
| 93 TransformFeedback* CreateTransformFeedback( | 93 TransformFeedback* CreateTransformFeedback( |
| 94 GLuint client_id, GLuint service_id); | 94 GLuint client_id, GLuint service_id); |
| 95 | 95 |
| 96 TransformFeedback* GetTransformFeedback(GLuint client_id); | 96 TransformFeedback* GetTransformFeedback(GLuint client_id); |
| 97 | 97 |
| 98 // Removes a TransformFeedback info for the given client ID. | 98 // Removes a TransformFeedback info for the given client ID. |
| 99 void RemoveTransformFeedback(GLuint client_id); | 99 void RemoveTransformFeedback(GLuint client_id); |
| 100 | 100 |
| 101 void RemoveBoundBuffer(Buffer* buffer); |
| 102 |
| 101 GLuint max_transform_feedback_separate_attribs() const { | 103 GLuint max_transform_feedback_separate_attribs() const { |
| 102 return max_transform_feedback_separate_attribs_; | 104 return max_transform_feedback_separate_attribs_; |
| 103 } | 105 } |
| 104 | 106 |
| 105 bool needs_emulation() const { | 107 bool needs_emulation() const { |
| 106 return needs_emulation_; | 108 return needs_emulation_; |
| 107 } | 109 } |
| 108 | 110 |
| 109 bool lost_context() const { | 111 bool lost_context() const { |
| 110 return lost_context_; | 112 return lost_context_; |
| 111 } | 113 } |
| 112 | 114 |
| 113 private: | 115 private: |
| 114 // Info for each transform feedback in the system. | 116 // Info for each transform feedback in the system. |
| 115 base::hash_map<GLuint, | 117 base::hash_map<GLuint, |
| 116 scoped_refptr<TransformFeedback> > transform_feedbacks_; | 118 scoped_refptr<TransformFeedback> > transform_feedbacks_; |
| 117 | 119 |
| 118 GLuint max_transform_feedback_separate_attribs_; | 120 GLuint max_transform_feedback_separate_attribs_; |
| 119 | 121 |
| 120 bool needs_emulation_; | 122 bool needs_emulation_; |
| 121 bool lost_context_; | 123 bool lost_context_; |
| 122 | 124 |
| 123 DISALLOW_COPY_AND_ASSIGN(TransformFeedbackManager); | 125 DISALLOW_COPY_AND_ASSIGN(TransformFeedbackManager); |
| 124 }; | 126 }; |
| 125 | 127 |
| 126 } // namespace gles2 | 128 } // namespace gles2 |
| 127 } // namespace gpu | 129 } // namespace gpu |
| 128 | 130 |
| 129 #endif // GPU_COMMAND_BUFFER_SERVICE_TRANSFORM_FEEDBACK_MANAGER_H_ | 131 #endif // GPU_COMMAND_BUFFER_SERVICE_TRANSFORM_FEEDBACK_MANAGER_H_ |
| OLD | NEW |