Chromium Code Reviews| 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 0c5d96708e856d8e9c3d8578eb785c9f2d18c71e..bedf07708415667f869063a0459bca72ea631414 100644 |
| --- a/gpu/command_buffer/service/framebuffer_manager.cc |
| +++ b/gpu/command_buffer/service/framebuffer_manager.cc |
| @@ -403,6 +403,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; |
|
qiankun
2016/07/18 04:50:09
4 space indent.
|
| + } |
| + return false; |
| +} |
| + |
| bool Framebuffer::HasUnclearedColorAttachments() const { |
| for (AttachmentMap::const_iterator it = attachments_.begin(); |
| it != attachments_.end(); ++it) { |
| @@ -523,6 +535,9 @@ void Framebuffer::ClearUnclearedIntOr3DTexturesOrPartiallyClearedTextures( |
| } |
| } |
| +// TODO: 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, |
| @@ -724,7 +739,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(); |