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

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

Issue 2149523002: Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add depth_cleared_ and stencil_cleared_ for class texture and renderbuffer. Created 4 years, 5 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
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 2337843f68ef929b447efbf1cb4c81f7a4658d44..cb6ef48db5568f9336af3782c78543fc15c5b697 100644
--- a/gpu/command_buffer/service/framebuffer_manager.h
+++ b/gpu/command_buffer/service/framebuffer_manager.h
@@ -41,11 +41,13 @@ class GPU_EXPORT Framebuffer : public base::RefCounted<Framebuffer> {
virtual GLenum texture_type() const = 0;
virtual GLsizei samples() const = 0;
virtual GLuint object_name() const = 0;
+ virtual GLenum attachment() const = 0;
virtual bool cleared() const = 0;
virtual void SetCleared(
RenderbufferManager* renderbuffer_manager,
TextureManager* texture_manager,
bool cleared) = 0;
+ virtual bool IsDepthStencil() const = 0;
virtual bool IsPartiallyCleared() const = 0;
virtual bool IsTextureAttachment() const = 0;
virtual bool IsRenderbufferAttachment() const = 0;
@@ -84,6 +86,11 @@ class GPU_EXPORT Framebuffer : public base::RefCounted<Framebuffer> {
bool HasUnclearedAttachment(GLenum attachment) const;
bool HasUnclearedColorAttachments() const;
+ static bool IsDepthStencilFormat(GLenum internal_format) {
+ return internal_format == GL_DEPTH24_STENCIL8 ||
+ internal_format == GL_DEPTH32F_STENCIL8;
+ }
+
bool HasSRGBAttachments() const;
void ClearUnclearedIntOr3DTexturesOrPartiallyClearedTextures(

Powered by Google App Engine
This is Rietveld 408576698