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

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

Issue 2789773003: Send FrameSwapMessageQueue's messages with a separate IPC (Closed)
Patch Set: c 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
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 8adab6b820dee2bf94c9bfbe229912ead5f63fa6..5e844bdc5f3d43de93ccd393b0ae4d15464e0a8f 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -662,6 +662,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_id,
+ 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
@@ -736,6 +738,11 @@ class CONTENT_EXPORT RenderWidgetHostImpl : public RenderWidgetHost,
// Used for UMA logging how long the renderer was unresponsive.
void LogHangMonitorUnresponsive();
+ // Virtual for tests.
+ virtual void ProcessSwapMessages(std::vector<IPC::Message> messages);
+
+ void DidProcessFrame(uint32_t frame_id);
+
// 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.
@@ -948,6 +955,14 @@ class CONTENT_EXPORT RenderWidgetHostImpl : public RenderWidgetHost,
// not returning stale resources.
uint32_t last_compositor_frame_sink_id_ = 0;
+ // List of the tokens of all frames that their messages have not arrived.
+ // Tokens are in ascending order.
+ std::deque<uint32_t> queued_tokens_;
+
+ // List of all swap messages that their corresponding frames have not arrived.
+ // Sorted by frame token.
+ std::deque<std::pair<uint32_t, std::vector<IPC::Message>>> queued_messages_;
+
base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);

Powered by Google App Engine
This is Rietveld 408576698