Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Side by Side Diff: gpu/command_buffer/service/framebuffer_manager.h

Issue 1283303002: gpu: FBO must be incomplete if the attached texture is not cube complete. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Depend on https://codereview.chromium.org/1299683002 Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | gpu/command_buffer/service/framebuffer_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 26 matching lines...) Expand all
37 virtual GLsizei samples() const = 0; 37 virtual GLsizei samples() const = 0;
38 virtual GLuint object_name() const = 0; 38 virtual GLuint object_name() const = 0;
39 virtual bool cleared() const = 0; 39 virtual bool cleared() const = 0;
40 virtual void SetCleared( 40 virtual void SetCleared(
41 RenderbufferManager* renderbuffer_manager, 41 RenderbufferManager* renderbuffer_manager,
42 TextureManager* texture_manager, 42 TextureManager* texture_manager,
43 bool cleared) = 0; 43 bool cleared) = 0;
44 virtual bool IsTexture(TextureRef* texture) const = 0; 44 virtual bool IsTexture(TextureRef* texture) const = 0;
45 virtual bool IsRenderbuffer( 45 virtual bool IsRenderbuffer(
46 Renderbuffer* renderbuffer) const = 0; 46 Renderbuffer* renderbuffer) const = 0;
47 virtual bool IsAttachmentComplete(FeatureInfo* feature_info) const = 0;
47 virtual bool CanRenderTo() const = 0; 48 virtual bool CanRenderTo() const = 0;
48 virtual void DetachFromFramebuffer(Framebuffer* framebuffer) const = 0; 49 virtual void DetachFromFramebuffer(Framebuffer* framebuffer) const = 0;
49 virtual bool ValidForAttachmentType( 50 virtual bool ValidForAttachmentType(
50 GLenum attachment_type, uint32 max_color_attachments) = 0; 51 GLenum attachment_type, uint32 max_color_attachments) = 0;
51 virtual size_t GetSignatureSize(TextureManager* texture_manager) const = 0; 52 virtual size_t GetSignatureSize(TextureManager* texture_manager) const = 0;
52 virtual void AddToSignature( 53 virtual void AddToSignature(
53 TextureManager* texture_manager, std::string* signature) const = 0; 54 TextureManager* texture_manager, std::string* signature) const = 0;
54 virtual void OnWillRenderTo() const = 0; 55 virtual void OnWillRenderTo() const = 0;
55 virtual void OnDidRenderTo() const = 0; 56 virtual void OnDidRenderTo() const = 0;
56 virtual bool FormsFeedbackLoop(TextureRef* texture, GLint level) const = 0; 57 virtual bool FormsFeedbackLoop(TextureRef* texture, GLint level) const = 0;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // returns 0. 123 // returns 0.
123 GLenum GetReadBufferTextureType() const; 124 GLenum GetReadBufferTextureType() const;
124 125
125 // Verify all the rules in OpenGL ES 2.0.25 4.4.5 are followed. 126 // Verify all the rules in OpenGL ES 2.0.25 4.4.5 are followed.
126 // Returns GL_FRAMEBUFFER_COMPLETE if there are no reasons we know we can't 127 // Returns GL_FRAMEBUFFER_COMPLETE if there are no reasons we know we can't
127 // use this combination of attachments. Otherwise returns the value 128 // use this combination of attachments. Otherwise returns the value
128 // that glCheckFramebufferStatus should return for this set of attachments. 129 // that glCheckFramebufferStatus should return for this set of attachments.
129 // Note that receiving GL_FRAMEBUFFER_COMPLETE from this function does 130 // Note that receiving GL_FRAMEBUFFER_COMPLETE from this function does
130 // not mean the real OpenGL will consider it framebuffer complete. It just 131 // not mean the real OpenGL will consider it framebuffer complete. It just
131 // means it passed our tests. 132 // means it passed our tests.
132 GLenum IsPossiblyComplete() const; 133 GLenum IsPossiblyComplete(GLenum target, FeatureInfo* feature_info) const;
133 134
134 // Implements optimized glGetFramebufferStatus. 135 // Implements optimized glGetFramebufferStatus.
135 GLenum GetStatus(TextureManager* texture_manager, GLenum target) const; 136 GLenum GetStatus(TextureManager* texture_manager, GLenum target) const;
136 137
137 // Check all attachments are cleared 138 // Check all attachments are cleared
138 bool IsCleared() const; 139 bool IsCleared() const;
139 140
140 GLenum GetDrawBuffer(GLenum draw_buffer) const; 141 GLenum GetDrawBuffer(GLenum draw_buffer) const;
141 142
142 void SetDrawBuffers(GLsizei n, const GLenum* bufs); 143 void SetDrawBuffers(GLsizei n, const GLenum* bufs);
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 typedef std::vector<TextureDetachObserver*> TextureDetachObserverVector; 340 typedef std::vector<TextureDetachObserver*> TextureDetachObserverVector;
340 TextureDetachObserverVector texture_detach_observers_; 341 TextureDetachObserverVector texture_detach_observers_;
341 342
342 DISALLOW_COPY_AND_ASSIGN(FramebufferManager); 343 DISALLOW_COPY_AND_ASSIGN(FramebufferManager);
343 }; 344 };
344 345
345 } // namespace gles2 346 } // namespace gles2
346 } // namespace gpu 347 } // namespace gpu
347 348
348 #endif // GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_ 349 #endif // GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/framebuffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698