| 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 | |
| 103 GLuint max_transform_feedback_separate_attribs() const { | 101 GLuint max_transform_feedback_separate_attribs() const { |
| 104 return max_transform_feedback_separate_attribs_; | 102 return max_transform_feedback_separate_attribs_; |
| 105 } | 103 } |
| 106 | 104 |
| 107 bool needs_emulation() const { | 105 bool needs_emulation() const { |
| 108 return needs_emulation_; | 106 return needs_emulation_; |
| 109 } | 107 } |
| 110 | 108 |
| 111 bool lost_context() const { | 109 bool lost_context() const { |
| 112 return lost_context_; | 110 return lost_context_; |
| 113 } | 111 } |
| 114 | 112 |
| 115 private: | 113 private: |
| 116 // Info for each transform feedback in the system. | 114 // Info for each transform feedback in the system. |
| 117 base::hash_map<GLuint, | 115 base::hash_map<GLuint, |
| 118 scoped_refptr<TransformFeedback> > transform_feedbacks_; | 116 scoped_refptr<TransformFeedback> > transform_feedbacks_; |
| 119 | 117 |
| 120 GLuint max_transform_feedback_separate_attribs_; | 118 GLuint max_transform_feedback_separate_attribs_; |
| 121 | 119 |
| 122 bool needs_emulation_; | 120 bool needs_emulation_; |
| 123 bool lost_context_; | 121 bool lost_context_; |
| 124 | 122 |
| 125 DISALLOW_COPY_AND_ASSIGN(TransformFeedbackManager); | 123 DISALLOW_COPY_AND_ASSIGN(TransformFeedbackManager); |
| 126 }; | 124 }; |
| 127 | 125 |
| 128 } // namespace gles2 | 126 } // namespace gles2 |
| 129 } // namespace gpu | 127 } // namespace gpu |
| 130 | 128 |
| 131 #endif // GPU_COMMAND_BUFFER_SERVICE_TRANSFORM_FEEDBACK_MANAGER_H_ | 129 #endif // GPU_COMMAND_BUFFER_SERVICE_TRANSFORM_FEEDBACK_MANAGER_H_ |
| OLD | NEW |