| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 bool cleared) = 0; | 42 bool cleared) = 0; |
| 43 virtual bool IsTexture(TextureRef* texture) const = 0; | 43 virtual bool IsTexture(TextureRef* texture) const = 0; |
| 44 virtual bool IsRenderbuffer( | 44 virtual bool IsRenderbuffer( |
| 45 Renderbuffer* renderbuffer) const = 0; | 45 Renderbuffer* renderbuffer) const = 0; |
| 46 virtual bool CanRenderTo() const = 0; | 46 virtual bool CanRenderTo() const = 0; |
| 47 virtual void DetachFromFramebuffer(Framebuffer* framebuffer) const = 0; | 47 virtual void DetachFromFramebuffer(Framebuffer* framebuffer) const = 0; |
| 48 virtual bool ValidForAttachmentType( | 48 virtual bool ValidForAttachmentType( |
| 49 GLenum attachment_type, uint32 max_color_attachments) = 0; | 49 GLenum attachment_type, uint32 max_color_attachments) = 0; |
| 50 virtual void AddToSignature( | 50 virtual void AddToSignature( |
| 51 TextureManager* texture_manager, std::string* signature) const = 0; | 51 TextureManager* texture_manager, std::string* signature) const = 0; |
| 52 virtual void OnWillRenderTo() const = 0; |
| 53 virtual void OnDidRenderTo() const = 0; |
| 52 | 54 |
| 53 protected: | 55 protected: |
| 54 friend class base::RefCounted<Attachment>; | 56 friend class base::RefCounted<Attachment>; |
| 55 virtual ~Attachment() {} | 57 virtual ~Attachment() {} |
| 56 }; | 58 }; |
| 57 | 59 |
| 58 Framebuffer(FramebufferManager* manager, GLuint service_id); | 60 Framebuffer(FramebufferManager* manager, GLuint service_id); |
| 59 | 61 |
| 60 GLuint service_id() const { | 62 GLuint service_id() const { |
| 61 return service_id_; | 63 return service_id_; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 // Return true if any draw buffers has an alpha channel. | 132 // Return true if any draw buffers has an alpha channel. |
| 131 bool HasAlphaMRT() const; | 133 bool HasAlphaMRT() const; |
| 132 | 134 |
| 133 static void ClearFramebufferCompleteComboMap(); | 135 static void ClearFramebufferCompleteComboMap(); |
| 134 | 136 |
| 135 static bool AllowFramebufferComboCompleteMapForTesting() { | 137 static bool AllowFramebufferComboCompleteMapForTesting() { |
| 136 return allow_framebuffer_combo_complete_map_; | 138 return allow_framebuffer_combo_complete_map_; |
| 137 } | 139 } |
| 138 | 140 |
| 139 void OnTextureRefDetached(TextureRef* texture); | 141 void OnTextureRefDetached(TextureRef* texture); |
| 142 void OnWillRenderTo() const; |
| 143 void OnDidRenderTo() const; |
| 140 | 144 |
| 141 private: | 145 private: |
| 142 friend class FramebufferManager; | 146 friend class FramebufferManager; |
| 143 friend class base::RefCounted<Framebuffer>; | 147 friend class base::RefCounted<Framebuffer>; |
| 144 | 148 |
| 145 ~Framebuffer(); | 149 ~Framebuffer(); |
| 146 | 150 |
| 147 void MarkAsDeleted(); | 151 void MarkAsDeleted(); |
| 148 | 152 |
| 149 void MarkAttachmentsAsCleared( | 153 void MarkAttachmentsAsCleared( |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 typedef std::vector<TextureDetachObserver*> TextureDetachObserverVector; | 294 typedef std::vector<TextureDetachObserver*> TextureDetachObserverVector; |
| 291 TextureDetachObserverVector texture_detach_observers_; | 295 TextureDetachObserverVector texture_detach_observers_; |
| 292 | 296 |
| 293 DISALLOW_COPY_AND_ASSIGN(FramebufferManager); | 297 DISALLOW_COPY_AND_ASSIGN(FramebufferManager); |
| 294 }; | 298 }; |
| 295 | 299 |
| 296 } // namespace gles2 | 300 } // namespace gles2 |
| 297 } // namespace gpu | 301 } // namespace gpu |
| 298 | 302 |
| 299 #endif // GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_ | 303 #endif // GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_ |
| OLD | NEW |