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

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

Issue 2120343002: command_buffer: correctly use glGetFramebufferAttachmentParameter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments 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.cc
diff --git a/gpu/command_buffer/service/framebuffer_manager.cc b/gpu/command_buffer/service/framebuffer_manager.cc
index 04f05f6c89a02e14a3c148937a7cfe8c48f19c59..0c5d96708e856d8e9c3d8578eb785c9f2d18c71e 100644
--- a/gpu/command_buffer/service/framebuffer_manager.cc
+++ b/gpu/command_buffer/service/framebuffer_manager.cc
@@ -552,6 +552,10 @@ void Framebuffer::MarkAttachmentsAsCleared(
}
}
+bool Framebuffer::HasColorAttachment(int index) const {
+ return attachments_.find(GL_COLOR_ATTACHMENT0 + index) != attachments_.end();
+}
+
bool Framebuffer::HasDepthAttachment() const {
return attachments_.find(GL_DEPTH_STENCIL_ATTACHMENT) != attachments_.end() ||
attachments_.find(GL_DEPTH_ATTACHMENT) != attachments_.end();

Powered by Google App Engine
This is Rietveld 408576698