Commit f9c5dbeb authored by Stefan Zager's avatar Stefan Zager Committed by Commit Bot

Delete unused field in FrameHostMsg_SynchronizeVisualProperties IPC

Change-Id: Ie81f70a0fc5db38806fc496cdb2b9c783a1daa00
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2423043Reviewed-by: default avatarDave Tapuska <dtapuska@chromium.org>
Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Stefan Zager <szager@chromium.org>
Cr-Commit-Position: refs/heads/master@{#809829}
parent ab8c0abc
......@@ -290,7 +290,6 @@ void CrossProcessFrameConnector::UnlockMouse() {
}
void CrossProcessFrameConnector::OnSynchronizeVisualProperties(
const viz::FrameSinkId& frame_sink_id,
const blink::FrameVisualProperties& visual_properties) {
TRACE_EVENT_WITH_FLOW2(
TRACE_DISABLED_BY_DEFAULT("viz.surface_id_flow"),
......@@ -319,7 +318,7 @@ void CrossProcessFrameConnector::OnSynchronizeVisualProperties(
last_received_zoom_level_ = visual_properties.zoom_level;
last_received_local_frame_size_ = visual_properties.local_frame_size;
SynchronizeVisualProperties(frame_sink_id, visual_properties);
SynchronizeVisualProperties(visual_properties);
}
void CrossProcessFrameConnector::OnUpdateViewportIntersection(
......
......@@ -189,7 +189,6 @@ class CONTENT_EXPORT CrossProcessFrameConnector
// Handlers for messages received from the parent frame.
void OnSynchronizeVisualProperties(
const viz::FrameSinkId& frame_sink_id,
const blink::FrameVisualProperties& visual_properties);
void OnUpdateViewportIntersection(
const blink::ViewportIntersectionState& viewport_intersection);
......
......@@ -30,7 +30,6 @@ void FrameConnectorDelegate::SendIntrinsicSizingInfoToParent(
blink::mojom::IntrinsicSizingInfoPtr) {}
void FrameConnectorDelegate::SynchronizeVisualProperties(
const viz::FrameSinkId& frame_sink_id,
const blink::FrameVisualProperties& visual_properties) {
screen_info_ = visual_properties.screen_info;
local_surface_id_allocation_ = visual_properties.local_surface_id_allocation;
......
......@@ -80,7 +80,6 @@ class CONTENT_EXPORT FrameConnectorDelegate {
// Sends new resize parameters to the sub-frame's renderer.
void SynchronizeVisualProperties(
const viz::FrameSinkId& frame_sink_id,
const blink::FrameVisualProperties& visual_properties);
// Return the size of the CompositorFrame to use in the child renderer.
......
......@@ -293,7 +293,6 @@ TEST_F(RenderWidgetHostViewChildFrameTest,
allocator.GenerateId();
viz::LocalSurfaceIdAllocation local_surface_id_allocation =
allocator.GetCurrentLocalSurfaceIdAllocation();
constexpr viz::FrameSinkId frame_sink_id(1, 1);
blink::FrameVisualProperties visual_properties;
visual_properties.screen_space_rect = screen_space_rect;
......@@ -305,8 +304,7 @@ TEST_F(RenderWidgetHostViewChildFrameTest,
base::RunLoop().RunUntilIdle();
widget_.ClearVisualProperties();
test_frame_connector_->SynchronizeVisualProperties(frame_sink_id,
visual_properties);
test_frame_connector_->SynchronizeVisualProperties(visual_properties);
// Update to the renderer.
base::RunLoop().RunUntilIdle();
......
......@@ -604,8 +604,7 @@ IPC_MESSAGE_CONTROL3(FrameHostMsg_PluginInstanceThrottleStateChange,
IPC_MESSAGE_ROUTED0(FrameHostMsg_Unload_ACK)
// Tells the browser that a child's visual properties have changed.
IPC_MESSAGE_ROUTED2(FrameHostMsg_SynchronizeVisualProperties,
viz::FrameSinkId /* frame_sink_id */,
IPC_MESSAGE_ROUTED1(FrameHostMsg_SynchronizeVisualProperties,
blink::FrameVisualProperties)
// Sent by a parent frame to notify its child about the state of the child's
......
......@@ -3443,12 +3443,6 @@ void SynchronizeVisualPropertiesMessageFilter::ResetRectRunLoop() {
screen_space_rect_received_ = false;
}
viz::FrameSinkId SynchronizeVisualPropertiesMessageFilter::GetOrWaitForId() {
// No-op if already quit.
frame_sink_id_run_loop_.Run();
return frame_sink_id_;
}
viz::LocalSurfaceId
SynchronizeVisualPropertiesMessageFilter::WaitForSurfaceId() {
surface_id_run_loop_ = std::make_unique<base::RunLoop>();
......@@ -3461,13 +3455,11 @@ SynchronizeVisualPropertiesMessageFilter::
void SynchronizeVisualPropertiesMessageFilter::
OnSynchronizeFrameHostVisualProperties(
const viz::FrameSinkId& frame_sink_id,
const blink::FrameVisualProperties& visual_properties) {
OnSynchronizeVisualProperties(frame_sink_id, visual_properties);
OnSynchronizeVisualProperties(visual_properties);
}
void SynchronizeVisualPropertiesMessageFilter::OnSynchronizeVisualProperties(
const viz::FrameSinkId& frame_sink_id,
const blink::FrameVisualProperties& visual_properties) {
// Monitor |is_pinch_gesture_active| to determine when pinch gestures begin
// and end.
......@@ -3508,16 +3500,6 @@ void SynchronizeVisualPropertiesMessageFilter::OnSynchronizeVisualProperties(
this,
visual_properties.local_surface_id_allocation.local_surface_id()));
// Record the received value. We cannot check the current state of the child
// frame, as it can only be processed on the UI thread, and we cannot block
// here.
frame_sink_id_ = frame_sink_id;
// There can be several updates before a valid viz::FrameSinkId is ready. Do
// not quit |run_loop_| until after we receive a valid one.
if (!frame_sink_id_.is_valid())
return;
// We can't nest on the IO thread. So tests will wait on the UI thread, so
// post there to exit the nesting.
GetUIThreadTaskRunner({})->PostTask(
......@@ -3539,7 +3521,7 @@ void SynchronizeVisualPropertiesMessageFilter::OnUpdatedFrameRectOnUI(
}
void SynchronizeVisualPropertiesMessageFilter::OnUpdatedFrameSinkIdOnUI() {
frame_sink_id_run_loop_.Quit();
run_loop_.Quit();
}
void SynchronizeVisualPropertiesMessageFilter::OnUpdatedSurfaceIdOnUI(
......
......@@ -1773,11 +1773,6 @@ class SynchronizeVisualPropertiesMessageFilter
void WaitForRect();
void ResetRectRunLoop();
// Returns the new viz::FrameSinkId immediately if the IPC has been received.
// Otherwise this will block the UI thread until it has been received, then it
// will return the new viz::FrameSinkId.
viz::FrameSinkId GetOrWaitForId();
// Waits for the next viz::LocalSurfaceId be received and returns it.
viz::LocalSurfaceId WaitForSurfaceId();
......@@ -1791,10 +1786,8 @@ class SynchronizeVisualPropertiesMessageFilter
private:
void OnSynchronizeFrameHostVisualProperties(
const viz::FrameSinkId& frame_sink_id,
const blink::FrameVisualProperties& visual_properties);
void OnSynchronizeVisualProperties(
const viz::FrameSinkId& frame_sink_id,
const blink::FrameVisualProperties& visual_properties);
// |rect| is in DIPs.
void OnUpdatedFrameRectOnUI(const gfx::Rect& rect);
......@@ -1803,8 +1796,7 @@ class SynchronizeVisualPropertiesMessageFilter
bool OnMessageReceived(const IPC::Message& message) override;
viz::FrameSinkId frame_sink_id_;
base::RunLoop frame_sink_id_run_loop_;
base::RunLoop run_loop_;
std::unique_ptr<base::RunLoop> screen_space_rect_run_loop_;
bool screen_space_rect_received_;
......
......@@ -571,7 +571,7 @@ void RenderFrameProxy::SynchronizeVisualProperties() {
// Let the browser know about the updated view rect.
Send(new FrameHostMsg_SynchronizeVisualProperties(
routing_id_, frame_sink_id_, pending_visual_properties_));
routing_id_, pending_visual_properties_));
sent_visual_properties_ = pending_visual_properties_;
TRACE_EVENT_WITH_FLOW2(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment