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..f0a31d5ebfa776bb7883390b94c53b67109a53e5 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): when the texture or the renderbuffer in format |
Ken Russell (switch to Gerrit)
2016/07/20 23:36:06
Use full email address please.
|
+// 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(); |