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

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

Issue 2611403002: Fix a bug in drawBuffers optimization. (Closed)
Patch Set: update Created 3 years, 11 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 | « no previous file | gpu/command_buffer/service/framebuffer_manager.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.h
diff --git a/gpu/command_buffer/service/framebuffer_manager.h b/gpu/command_buffer/service/framebuffer_manager.h
index d2ebe070e5a30bf36d6189d89312c6d0cec72dc4..e4433cc045dbd3e0a342850a3d68facdac1f1f65 100644
--- a/gpu/command_buffer/service/framebuffer_manager.h
+++ b/gpu/command_buffer/service/framebuffer_manager.h
@@ -194,6 +194,11 @@ class GPU_EXPORT Framebuffer : public base::RefCounted<Framebuffer> {
bool ValidateAndAdjustDrawBuffers(uint32_t fragment_output_type_mask,
uint32_t fragment_output_written_mask);
+ // Filter out the draw buffers that have no images attached but are not NONE
+ // through DrawBuffers, to be on the safe side.
+ // This is applied before a clear call.
+ void AdjustDrawBuffers();
+
bool ContainsActiveIntegerAttachments() const;
// Return true if any draw buffers has an alpha channel.
@@ -247,6 +252,9 @@ class GPU_EXPORT Framebuffer : public base::RefCounted<Framebuffer> {
// This call is only valid on a complete fbo.
void UpdateDrawBufferMasks();
+ // Helper for ValidateAndAdjustDrawBuffers() and AdjustDrawBuffers().
+ void AdjustDrawBuffersImpl(uint32_t desired_mask);
+
// The managers that owns this.
FramebufferManager* manager_;
« no previous file with comments | « no previous file | gpu/command_buffer/service/framebuffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698