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

Unified Diff: third_party/WebKit/Source/modules/vr/VRDisplay.cpp

Issue 2766553004: WebVR: clear screen after submit if preserveDrawingBuffer is false. (Closed)
Patch Set: Rename to markCompositedAndClearBackbufferIfNeeded Created 3 years, 9 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 | third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/vr/VRDisplay.cpp
diff --git a/third_party/WebKit/Source/modules/vr/VRDisplay.cpp b/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
index 2fb51eb7a22bc52a12f9de73a174f70efa99d492..6f13f70e67a81d7f10850cbfc01f761ef2435a06 100644
--- a/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
+++ b/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
@@ -600,6 +600,11 @@ void VRDisplay::submitFrame() {
m_vrFrameId, gpu::MailboxHolder(staticImage->mailbox(),
staticImage->syncToken(), GL_TEXTURE_2D));
+ // If preserveDrawingBuffer is false, must clear now. Normally this
+ // happens as part of compositing, but that's not active while
+ // presenting, so run the responsible code directly.
+ m_renderingContext->markCompositedAndClearBackbufferIfNeeded();
+
// If we're not deferring the wait for transferring the mailbox,
// we need to wait for it now to prevent the image going out of
// scope before its mailbox is retrieved.
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698