| 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 #ifndef GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_ |
| 6 #define GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 | 158 |
| 159 // A map of attachments. | 159 // A map of attachments. |
| 160 typedef base::hash_map<GLenum, scoped_refptr<Attachment> > AttachmentMap; | 160 typedef base::hash_map<GLenum, scoped_refptr<Attachment> > AttachmentMap; |
| 161 AttachmentMap attachments_; | 161 AttachmentMap attachments_; |
| 162 | 162 |
| 163 // A map of successful frame buffer combos. If it's in the map | 163 // A map of successful frame buffer combos. If it's in the map |
| 164 // it should be FRAMEBUFFER_COMPLETE. | 164 // it should be FRAMEBUFFER_COMPLETE. |
| 165 typedef base::hash_map<std::string, bool> FramebufferComboCompleteMap; | 165 typedef base::hash_map<std::string, bool> FramebufferComboCompleteMap; |
| 166 static FramebufferComboCompleteMap* framebuffer_combo_complete_map_; | 166 static FramebufferComboCompleteMap* framebuffer_combo_complete_map_; |
| 167 | 167 |
| 168 scoped_array<GLenum> draw_buffers_; | 168 scoped_ptr<GLenum[]> draw_buffers_; |
| 169 | 169 |
| 170 DISALLOW_COPY_AND_ASSIGN(Framebuffer); | 170 DISALLOW_COPY_AND_ASSIGN(Framebuffer); |
| 171 }; | 171 }; |
| 172 | 172 |
| 173 // This class keeps track of the frambebuffers and their attached renderbuffers | 173 // This class keeps track of the frambebuffers and their attached renderbuffers |
| 174 // so we can correctly clear them. | 174 // so we can correctly clear them. |
| 175 class GPU_EXPORT FramebufferManager { | 175 class GPU_EXPORT FramebufferManager { |
| 176 public: | 176 public: |
| 177 FramebufferManager(uint32 max_draw_buffers, uint32 max_color_attachments); | 177 FramebufferManager(uint32 max_draw_buffers, uint32 max_color_attachments); |
| 178 ~FramebufferManager(); | 178 ~FramebufferManager(); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 uint32 max_draw_buffers_; | 231 uint32 max_draw_buffers_; |
| 232 uint32 max_color_attachments_; | 232 uint32 max_color_attachments_; |
| 233 | 233 |
| 234 DISALLOW_COPY_AND_ASSIGN(FramebufferManager); | 234 DISALLOW_COPY_AND_ASSIGN(FramebufferManager); |
| 235 }; | 235 }; |
| 236 | 236 |
| 237 } // namespace gles2 | 237 } // namespace gles2 |
| 238 } // namespace gpu | 238 } // namespace gpu |
| 239 | 239 |
| 240 #endif // GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_ | 240 #endif // GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_ |
| OLD | NEW |