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

Unified Diff: gpu/command_buffer/service/framebuffer_manager.h

Issue 8341128: Defer clearing textures and renderbuffers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix one more unit test Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gpu/command_buffer/service/framebuffer_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/framebuffer_manager.h
diff --git a/gpu/command_buffer/service/framebuffer_manager.h b/gpu/command_buffer/service/framebuffer_manager.h
index 737dfffb6394dbd9d2e19821c371ec661106148d..78b3e2fed2bdacb204e4867483d751d6538513ae 100644
--- a/gpu/command_buffer/service/framebuffer_manager.h
+++ b/gpu/command_buffer/service/framebuffer_manager.h
@@ -35,9 +35,13 @@ class FramebufferManager {
virtual GLenum internal_format() const = 0;
virtual GLsizei samples() const = 0;
virtual bool cleared() const = 0;
- virtual void set_cleared() = 0;
+ virtual void SetCleared(
+ RenderbufferManager* renderbuffer_manager,
+ TextureManager* texture_manager) = 0;
virtual bool IsTexture(TextureManager::TextureInfo* texture) const = 0;
virtual bool CanRenderTo() const = 0;
+ virtual void DetachFromFramebuffer() = 0;
+ virtual bool ValidForAttachmentType(GLenum attachment_type) = 0;
};
explicit FramebufferInfo(GLuint service_id);
@@ -58,7 +62,9 @@ class FramebufferManager {
GLenum attachment, TextureManager::TextureInfo* texture, GLenum target,
GLint level);
- void MarkAttachedRenderbuffersAsCleared();
+ void MarkAttachmentsAsCleared(
+ RenderbufferManager* renderbuffer_manager,
+ TextureManager* texture_manager);
const Attachment* GetAttachment(GLenum attachment) const;
@@ -78,11 +84,17 @@ class FramebufferManager {
bool HasStencilAttachment() const;
GLenum GetColorAttachmentFormat() const;
- // We can't know if the frame buffer is complete since that is
- // implementation dependent and we'd have to check after every glTexImage
- // call but we can know in certain cases that it's NOT complete which we
- // need to enforce the OpenGL ES 2.0 spec on top of DesktopGL.
- bool IsNotComplete() const;
+ // Verify all the rules in OpenGL ES 2.0.25 4.4.5 are followed.
+ // Returns GL_FRAMEBUFFER_COMPLETE if there are no reasons we know we can't
+ // use this combination of attachments. Otherwise returns the value
+ // that glCheckFramebufferStatus should return for this set of attachments.
+ // Note that receiving GL_FRAMEBUFFER_COMPLETE from this function does
+ // not mean the real OpenGL will consider it framebuffer complete. It just
+ // means it passed our tests.
+ GLenum IsPossiblyComplete() const;
+
+ // Check all attachments are cleared
+ bool IsCleared() const;
private:
friend class FramebufferManager;
@@ -90,10 +102,7 @@ class FramebufferManager {
~FramebufferInfo();
- void MarkAsDeleted() {
- service_id_ = 0;
- attachments_.clear();
- }
+ void MarkAsDeleted();
// Service side framebuffer id.
GLuint service_id_;
« 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