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

Unified Diff: gpu/command_buffer/service/texture_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/texture_manager.h
diff --git a/gpu/command_buffer/service/texture_manager.h b/gpu/command_buffer/service/texture_manager.h
index 0c74c4b85057e97ac057420b9503bb45c1bb9ec4..46f20bd047d0d3ae293f15cf531ae3ce7f936d9f 100644
--- a/gpu/command_buffer/service/texture_manager.h
+++ b/gpu/command_buffer/service/texture_manager.h
@@ -261,6 +261,11 @@ class GPU_EXPORT Texture {
// Whether a particular level/face is cleared.
bool IsLevelCleared(GLenum target, GLint level) const;
+
+ // Only meaningful when the format is DEPTH_STENCIL.
+ // Whether a particular part is cleared.
+ bool IsLevelCleared(GLenum target, GLint level, GLenum attachment) const;
+
// Whether a particular level/face is partially cleared.
bool IsLevelPartiallyCleared(GLenum target, GLint level) const;
@@ -395,6 +400,13 @@ class GPU_EXPORT Texture {
// Marks a particular level as cleared or uncleared.
void SetLevelCleared(GLenum target, GLint level, bool cleared);
+ // Only meaningful when the format is DEPTH_STENCIL.
+ // Marks a particular part as cleared or uncleared.
+ void SetLevelCleared(GLenum target,
+ GLint level,
+ GLenum attachment,
+ bool cleared);
+
// Updates the cleared flag for this texture by inspecting all the mips.
void UpdateCleared();
@@ -553,6 +565,12 @@ class GPU_EXPORT Texture {
// Whether all renderable mips of this texture have been cleared.
bool cleared_;
+ // Only meaningful when format is DEPTH_STENCIL.
+ // Whether the depth part of the texture have been cleared.
+ bool depth_cleared_;
+ // Whether the stencil part of the texture have been cleared.
+ bool stencil_cleared_ ;
+
int num_uncleared_mips_;
int num_npot_faces_;
@@ -848,6 +866,11 @@ class GPU_EXPORT TextureManager : public base::trace_event::MemoryDumpProvider {
void SetLevelCleared(TextureRef* ref, GLenum target,
GLint level, bool cleared);
+ // Only meaningful when the internal format is DEPTH_STENCIL.
+ // Sets the particular part of the texture as cleared or uncleared.
+ void SetLevelCleared(TextureRef* ref, GLenum target,
+ GLint level, GLenum attachment, bool cleared);
+
// Sets a texture parameter of a Texture
// Returns GL_NO_ERROR on success. Otherwise the error to generate.
// TODO(gman): Expand to SetParameteriv,fv

Powered by Google App Engine
This is Rietveld 408576698