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 28 matching lines...) Expand all Loading... | |
39 virtual void SetCleared( | 39 virtual void SetCleared( |
40 RenderbufferManager* renderbuffer_manager, | 40 RenderbufferManager* renderbuffer_manager, |
41 TextureManager* texture_manager, | 41 TextureManager* texture_manager, |
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, |
50 bool allow_float_rgba_color_attachment, | |
51 bool allow_float_rgb_color_attachment) = 0; | |
50 virtual void AddToSignature( | 52 virtual void AddToSignature( |
51 TextureManager* texture_manager, std::string* signature) const = 0; | 53 TextureManager* texture_manager, std::string* signature) 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 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
108 // returns 0. | 110 // returns 0. |
109 GLenum GetColorAttachmentTextureType() const; | 111 GLenum GetColorAttachmentTextureType() const; |
110 | 112 |
111 // Verify all the rules in OpenGL ES 2.0.25 4.4.5 are followed. | 113 // Verify all the rules in OpenGL ES 2.0.25 4.4.5 are followed. |
112 // Returns GL_FRAMEBUFFER_COMPLETE if there are no reasons we know we can't | 114 // Returns GL_FRAMEBUFFER_COMPLETE if there are no reasons we know we can't |
113 // use this combination of attachments. Otherwise returns the value | 115 // use this combination of attachments. Otherwise returns the value |
114 // that glCheckFramebufferStatus should return for this set of attachments. | 116 // that glCheckFramebufferStatus should return for this set of attachments. |
115 // Note that receiving GL_FRAMEBUFFER_COMPLETE from this function does | 117 // Note that receiving GL_FRAMEBUFFER_COMPLETE from this function does |
116 // not mean the real OpenGL will consider it framebuffer complete. It just | 118 // not mean the real OpenGL will consider it framebuffer complete. It just |
117 // means it passed our tests. | 119 // means it passed our tests. |
118 GLenum IsPossiblyComplete() const; | 120 GLenum IsPossiblyComplete(bool allow_float_rgba_color_attachment, |
121 bool allow_float_rgb_color_attachment) const; | |
piman
2014/02/07 19:03:25
nit: Would it make sense to pass the FeatureInfo h
| |
119 | 122 |
120 // Implements optimized glGetFramebufferStatus. | 123 // Implements optimized glGetFramebufferStatus. |
121 GLenum GetStatus(TextureManager* texture_manager, GLenum target) const; | 124 GLenum GetStatus(TextureManager* texture_manager, GLenum target) const; |
122 | 125 |
123 // Check all attachments are cleared | 126 // Check all attachments are cleared |
124 bool IsCleared() const; | 127 bool IsCleared() const; |
125 | 128 |
126 GLenum GetDrawBuffer(GLenum draw_buffer) const; | 129 GLenum GetDrawBuffer(GLenum draw_buffer) const; |
127 | 130 |
128 void SetDrawBuffers(GLsizei n, const GLenum* bufs); | 131 void SetDrawBuffers(GLsizei n, const GLenum* bufs); |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
290 typedef std::vector<TextureDetachObserver*> TextureDetachObserverVector; | 293 typedef std::vector<TextureDetachObserver*> TextureDetachObserverVector; |
291 TextureDetachObserverVector texture_detach_observers_; | 294 TextureDetachObserverVector texture_detach_observers_; |
292 | 295 |
293 DISALLOW_COPY_AND_ASSIGN(FramebufferManager); | 296 DISALLOW_COPY_AND_ASSIGN(FramebufferManager); |
294 }; | 297 }; |
295 | 298 |
296 } // namespace gles2 | 299 } // namespace gles2 |
297 } // namespace gpu | 300 } // namespace gpu |
298 | 301 |
299 #endif // GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_ | 302 #endif // GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_ |
OLD | NEW |