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

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

Issue 2789773003: Send FrameSwapMessageQueue's messages with a separate IPC (Closed)
Patch Set: rebased 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 0fd97d07db654d03958accd3ee35e1010143e3b7..2efd0a121a4599bb4d5e7b0a2789348c56a4f573 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -661,6 +661,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
@@ -735,6 +737,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl : public RenderWidgetHost,
// Used for UMA logging how long the renderer was unresponsive.
void LogHangMonitorUnresponsive();
+ 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.
@@ -947,6 +952,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