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

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

Issue 2149523002: Make invalidateFramebuffer no-op for DEPTH_STENCIL attachment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use full email address in TODO 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
« no previous file with comments | « gpu/command_buffer/service/framebuffer_manager.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.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.cc
diff --git a/gpu/command_buffer/service/framebuffer_manager.cc b/gpu/command_buffer/service/framebuffer_manager.cc
index cec5b104b7ab678b71a164d4da999293e99df8a8..13cbbc2b396537d1082022b1c9d31b15d7d72b79 100644
--- a/gpu/command_buffer/service/framebuffer_manager.cc
+++ b/gpu/command_buffer/service/framebuffer_manager.cc
@@ -410,6 +410,18 @@ bool Framebuffer::HasUnclearedAttachment(
return false;
}
+bool Framebuffer::HasDepthStencilFormatAttachment(
+ GLenum attachment) const {
+ AttachmentMap::const_iterator it = attachments_.find(attachment);
+ if (it != attachments_.end()) {
+ const Attachment* attachment = it->second.get();
+ GLenum internal_format = attachment->internal_format();
+ return TextureManager::ExtractFormatFromStorageFormat(internal_format) ==
+ GL_DEPTH_STENCIL;
+ }
+ return false;
+}
+
bool Framebuffer::HasUnclearedColorAttachments() const {
for (AttachmentMap::const_iterator it = attachments_.begin();
it != attachments_.end(); ++it) {
@@ -559,6 +571,9 @@ void Framebuffer::ClearUnclearedIntOr3DTexturesOrPartiallyClearedTextures(
}
}
+// TODO(jiawei.shao@intel.com): when the texture or the renderbuffer in
+// format DEPTH_STENCIL, mark the specific part (depth or stencil) of it as
+// cleared or uncleared instead of the whole one.
void Framebuffer::MarkAttachmentAsCleared(
RenderbufferManager* renderbuffer_manager,
TextureManager* texture_manager,
@@ -760,7 +775,7 @@ GLenum Framebuffer::GetStatus(
}
bool Framebuffer::IsCleared() const {
- // are all the attachments cleaared?
+ // are all the attachments cleared?
for (AttachmentMap::const_iterator it = attachments_.begin();
it != attachments_.end(); ++it) {
Attachment* attachment = it->second.get();
« no previous file with comments | « gpu/command_buffer/service/framebuffer_manager.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698