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

Unified Diff: content/renderer/gpu/queue_message_swap_promise.cc

Issue 1986883002: blimp: Update page load status update indicator to use first paint. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test. Created 4 years, 7 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 | « content/public/browser/web_contents_observer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/gpu/queue_message_swap_promise.cc
diff --git a/content/renderer/gpu/queue_message_swap_promise.cc b/content/renderer/gpu/queue_message_swap_promise.cc
index 9653375e65ced1d51a0543bbc4a3ce7ca51658d1..8b99a17256c38cac5b7b3f69aa00d9d4eda3f9e4 100644
--- a/content/renderer/gpu/queue_message_swap_promise.cc
+++ b/content/renderer/gpu/queue_message_swap_promise.cc
@@ -4,6 +4,9 @@
#include "content/renderer/gpu/queue_message_swap_promise.h"
+#include "base/command_line.h"
+#include "content/public/common/content_switches.h"
+#include "content/public/renderer/render_thread.h"
#include "content/renderer/gpu/frame_swap_message_queue.h"
#include "ipc/ipc_sync_message_filter.h"
@@ -38,6 +41,20 @@ void QueueMessageSwapPromise::DidActivate() {
#endif
message_queue_->DidActivate(source_frame_number_);
// The OutputSurface will take care of the Drain+Send.
+
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kUseRemoteCompositing)) {
+ // The remote compositing mode doesn't have an output surface, so we need to
+ // Drain+Send on activation. Also, we can't use the SyncMessageFilter, since
+ // this call is actually made on the main thread.
+ std::vector<std::unique_ptr<IPC::Message>> messages_to_deliver;
+ std::unique_ptr<FrameSwapMessageQueue::SendMessageScope>
+ send_message_scope = message_queue_->AcquireSendMessageScope();
+ message_queue_->DrainMessages(&messages_to_deliver);
+ for (auto& message : messages_to_deliver)
+ RenderThread::Get()->Send(message.release());
+ PromiseCompleted();
+ }
}
void QueueMessageSwapPromise::DidSwap(cc::CompositorFrameMetadata* metadata) {
« no previous file with comments | « content/public/browser/web_contents_observer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698