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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.h

Issue 2789773003: Send FrameSwapMessageQueue's messages with a separate IPC (Closed)
Patch Set: Fix rebase mistake Created 3 years, 8 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/browser/bad_message.h ('k') | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_impl.h
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index f7015d07c3c8e12f8815abd88f9bd6ec8916d19c..c6c682fa6e90c08649c1d8bf22a845ae0c4683ce 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -667,6 +667,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl : public RenderWidgetHost,
const gfx::Vector2d& bitmap_offset_in_dip,
const DragEventSourceInfo& event_info);
void OnUpdateDragCursor(blink::WebDragOperation current_op);
+ void OnFrameSwapMessagesReceived(uint32_t frame_token,
+ std::vector<IPC::Message> messages);
// Called (either immediately or asynchronously) after we're done with our
// BackingStore and can send an ACK to the renderer so it can paint onto it
@@ -741,6 +743,14 @@ class CONTENT_EXPORT RenderWidgetHostImpl : public RenderWidgetHost,
// Used for UMA logging how long the renderer was unresponsive.
void LogHangMonitorUnresponsive();
+ // Signals that a frame with token |frame_token| was finished processing. If
+ // there are any queued messages belonging to it, they will be processed.
+ void DidProcessFrame(uint32_t frame_token);
+
+ // Once both the frame and its swap messages arrive, we call this method to
+ // process the messages. Virtual for tests.
+ virtual void ProcessSwapMessages(std::vector<IPC::Message> messages);
+
// true if a renderer has once been valid. We use this flag to display a sad
// tab only when we lose our renderer and not if a paint occurs during
// initialization.
@@ -955,6 +965,14 @@ class CONTENT_EXPORT RenderWidgetHostImpl : public RenderWidgetHost,
cc::CompositorFrameMetadata last_frame_metadata_;
+ // Last non-zero frame token received from the renderer. Any swap messsages
+ // having a token less than or equal to this value will be processed.
+ uint32_t last_received_frame_token_ = 0;
+
+ // List of all swap messages that their corresponding frames have not arrived.
+ // Sorted by frame token.
+ std::queue<std::pair<uint32_t, std::vector<IPC::Message>>> queued_messages_;
+
base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
« no previous file with comments | « content/browser/bad_message.h ('k') | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698