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() { ...@@ -290,7 +290,6 @@ void CrossProcessFrameConnector::UnlockMouse() {
} }
void CrossProcessFrameConnector::OnSynchronizeVisualProperties( void CrossProcessFrameConnector::OnSynchronizeVisualProperties(
const viz::FrameSinkId& frame_sink_id,
const blink::FrameVisualProperties& visual_properties) { const blink::FrameVisualProperties& visual_properties) {
TRACE_EVENT_WITH_FLOW2( TRACE_EVENT_WITH_FLOW2(
TRACE_DISABLED_BY_DEFAULT("viz.surface_id_flow"), TRACE_DISABLED_BY_DEFAULT("viz.surface_id_flow"),
...@@ -319,7 +318,7 @@ void CrossProcessFrameConnector::OnSynchronizeVisualProperties( ...@@ -319,7 +318,7 @@ void CrossProcessFrameConnector::OnSynchronizeVisualProperties(
last_received_zoom_level_ = visual_properties.zoom_level; last_received_zoom_level_ = visual_properties.zoom_level;
last_received_local_frame_size_ = visual_properties.local_frame_size; last_received_local_frame_size_ = visual_properties.local_frame_size;
SynchronizeVisualProperties(frame_sink_id, visual_properties); SynchronizeVisualProperties(visual_properties);
} }
void CrossProcessFrameConnector::OnUpdateViewportIntersection( void CrossProcessFrameConnector::OnUpdateViewportIntersection(
......
...@@ -189,7 +189,6 @@ class CONTENT_EXPORT CrossProcessFrameConnector ...@@ -189,7 +189,6 @@ class CONTENT_EXPORT CrossProcessFrameConnector
// Handlers for messages received from the parent frame. // Handlers for messages received from the parent frame.
void OnSynchronizeVisualProperties( void OnSynchronizeVisualProperties(
const viz::FrameSinkId& frame_sink_id,
const blink::FrameVisualProperties& visual_properties); const blink::FrameVisualProperties& visual_properties);
void OnUpdateViewportIntersection( void OnUpdateViewportIntersection(
const blink::ViewportIntersectionState& viewport_intersection); const blink::ViewportIntersectionState& viewport_intersection);
......
...@@ -30,7 +30,6 @@ void FrameConnectorDelegate::SendIntrinsicSizingInfoToParent( ...@@ -30,7 +30,6 @@ void FrameConnectorDelegate::SendIntrinsicSizingInfoToParent(
blink::mojom::IntrinsicSizingInfoPtr) {} blink::mojom::IntrinsicSizingInfoPtr) {}
void FrameConnectorDelegate::SynchronizeVisualProperties( void FrameConnectorDelegate::SynchronizeVisualProperties(
const viz::FrameSinkId& frame_sink_id,
const blink::FrameVisualProperties& visual_properties) { const blink::FrameVisualProperties& visual_properties) {
screen_info_ = visual_properties.screen_info; screen_info_ = visual_properties.screen_info;
local_surface_id_allocation_ = visual_properties.local_surface_id_allocation; local_surface_id_allocation_ = visual_properties.local_surface_id_allocation;
......
...@@ -80,7 +80,6 @@ class CONTENT_EXPORT FrameConnectorDelegate { ...@@ -80,7 +80,6 @@ class CONTENT_EXPORT FrameConnectorDelegate {
// Sends new resize parameters to the sub-frame's renderer. // Sends new resize parameters to the sub-frame's renderer.
void SynchronizeVisualProperties( void SynchronizeVisualProperties(
const viz::FrameSinkId& frame_sink_id,
const blink::FrameVisualProperties& visual_properties); const blink::FrameVisualProperties& visual_properties);
// Return the size of the CompositorFrame to use in the child renderer. // Return the size of the CompositorFrame to use in the child renderer.
......
...@@ -293,7 +293,6 @@ TEST_F(RenderWidgetHostViewChildFrameTest, ...@@ -293,7 +293,6 @@ TEST_F(RenderWidgetHostViewChildFrameTest,
allocator.GenerateId(); allocator.GenerateId();
viz::LocalSurfaceIdAllocation local_surface_id_allocation = viz::LocalSurfaceIdAllocation local_surface_id_allocation =
allocator.GetCurrentLocalSurfaceIdAllocation(); allocator.GetCurrentLocalSurfaceIdAllocation();
constexpr viz::FrameSinkId frame_sink_id(1, 1);
blink::FrameVisualProperties visual_properties; blink::FrameVisualProperties visual_properties;
visual_properties.screen_space_rect = screen_space_rect; visual_properties.screen_space_rect = screen_space_rect;
...@@ -305,8 +304,7 @@ TEST_F(RenderWidgetHostViewChildFrameTest, ...@@ -305,8 +304,7 @@ TEST_F(RenderWidgetHostViewChildFrameTest,
base::RunLoop().RunUntilIdle(); base::RunLoop().RunUntilIdle();
widget_.ClearVisualProperties(); widget_.ClearVisualProperties();
test_frame_connector_->SynchronizeVisualProperties(frame_sink_id, test_frame_connector_->SynchronizeVisualProperties(visual_properties);
visual_properties);
// Update to the renderer. // Update to the renderer.
base::RunLoop().RunUntilIdle(); base::RunLoop().RunUntilIdle();
......
...@@ -604,8 +604,7 @@ IPC_MESSAGE_CONTROL3(FrameHostMsg_PluginInstanceThrottleStateChange, ...@@ -604,8 +604,7 @@ IPC_MESSAGE_CONTROL3(FrameHostMsg_PluginInstanceThrottleStateChange,
IPC_MESSAGE_ROUTED0(FrameHostMsg_Unload_ACK) IPC_MESSAGE_ROUTED0(FrameHostMsg_Unload_ACK)
// Tells the browser that a child's visual properties have changed. // Tells the browser that a child's visual properties have changed.
IPC_MESSAGE_ROUTED2(FrameHostMsg_SynchronizeVisualProperties, IPC_MESSAGE_ROUTED1(FrameHostMsg_SynchronizeVisualProperties,
viz::FrameSinkId /* frame_sink_id */,
blink::FrameVisualProperties) blink::FrameVisualProperties)
// Sent by a parent frame to notify its child about the state of the child's // Sent by a parent frame to notify its child about the state of the child's
......
...@@ -3443,12 +3443,6 @@ void SynchronizeVisualPropertiesMessageFilter::ResetRectRunLoop() { ...@@ -3443,12 +3443,6 @@ void SynchronizeVisualPropertiesMessageFilter::ResetRectRunLoop() {
screen_space_rect_received_ = false; 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 viz::LocalSurfaceId
SynchronizeVisualPropertiesMessageFilter::WaitForSurfaceId() { SynchronizeVisualPropertiesMessageFilter::WaitForSurfaceId() {
surface_id_run_loop_ = std::make_unique<base::RunLoop>(); surface_id_run_loop_ = std::make_unique<base::RunLoop>();
...@@ -3461,13 +3455,11 @@ SynchronizeVisualPropertiesMessageFilter:: ...@@ -3461,13 +3455,11 @@ SynchronizeVisualPropertiesMessageFilter::
void SynchronizeVisualPropertiesMessageFilter:: void SynchronizeVisualPropertiesMessageFilter::
OnSynchronizeFrameHostVisualProperties( OnSynchronizeFrameHostVisualProperties(
const viz::FrameSinkId& frame_sink_id,
const blink::FrameVisualProperties& visual_properties) { const blink::FrameVisualProperties& visual_properties) {
OnSynchronizeVisualProperties(frame_sink_id, visual_properties); OnSynchronizeVisualProperties(visual_properties);
} }
void SynchronizeVisualPropertiesMessageFilter::OnSynchronizeVisualProperties( void SynchronizeVisualPropertiesMessageFilter::OnSynchronizeVisualProperties(
const viz::FrameSinkId& frame_sink_id,
const blink::FrameVisualProperties& visual_properties) { const blink::FrameVisualProperties& visual_properties) {
// Monitor |is_pinch_gesture_active| to determine when pinch gestures begin // Monitor |is_pinch_gesture_active| to determine when pinch gestures begin
// and end. // and end.
...@@ -3508,16 +3500,6 @@ void SynchronizeVisualPropertiesMessageFilter::OnSynchronizeVisualProperties( ...@@ -3508,16 +3500,6 @@ void SynchronizeVisualPropertiesMessageFilter::OnSynchronizeVisualProperties(
this, this,
visual_properties.local_surface_id_allocation.local_surface_id())); 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 // We can't nest on the IO thread. So tests will wait on the UI thread, so
// post there to exit the nesting. // post there to exit the nesting.
GetUIThreadTaskRunner({})->PostTask( GetUIThreadTaskRunner({})->PostTask(
...@@ -3539,7 +3521,7 @@ void SynchronizeVisualPropertiesMessageFilter::OnUpdatedFrameRectOnUI( ...@@ -3539,7 +3521,7 @@ void SynchronizeVisualPropertiesMessageFilter::OnUpdatedFrameRectOnUI(
} }
void SynchronizeVisualPropertiesMessageFilter::OnUpdatedFrameSinkIdOnUI() { void SynchronizeVisualPropertiesMessageFilter::OnUpdatedFrameSinkIdOnUI() {
frame_sink_id_run_loop_.Quit(); run_loop_.Quit();
} }
void SynchronizeVisualPropertiesMessageFilter::OnUpdatedSurfaceIdOnUI( void SynchronizeVisualPropertiesMessageFilter::OnUpdatedSurfaceIdOnUI(
......
...@@ -1773,11 +1773,6 @@ class SynchronizeVisualPropertiesMessageFilter ...@@ -1773,11 +1773,6 @@ class SynchronizeVisualPropertiesMessageFilter
void WaitForRect(); void WaitForRect();
void ResetRectRunLoop(); 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. // Waits for the next viz::LocalSurfaceId be received and returns it.
viz::LocalSurfaceId WaitForSurfaceId(); viz::LocalSurfaceId WaitForSurfaceId();
...@@ -1791,10 +1786,8 @@ class SynchronizeVisualPropertiesMessageFilter ...@@ -1791,10 +1786,8 @@ class SynchronizeVisualPropertiesMessageFilter
private: private:
void OnSynchronizeFrameHostVisualProperties( void OnSynchronizeFrameHostVisualProperties(
const viz::FrameSinkId& frame_sink_id,
const blink::FrameVisualProperties& visual_properties); const blink::FrameVisualProperties& visual_properties);
void OnSynchronizeVisualProperties( void OnSynchronizeVisualProperties(
const viz::FrameSinkId& frame_sink_id,
const blink::FrameVisualProperties& visual_properties); const blink::FrameVisualProperties& visual_properties);
// |rect| is in DIPs. // |rect| is in DIPs.
void OnUpdatedFrameRectOnUI(const gfx::Rect& rect); void OnUpdatedFrameRectOnUI(const gfx::Rect& rect);
...@@ -1803,8 +1796,7 @@ class SynchronizeVisualPropertiesMessageFilter ...@@ -1803,8 +1796,7 @@ class SynchronizeVisualPropertiesMessageFilter
bool OnMessageReceived(const IPC::Message& message) override; bool OnMessageReceived(const IPC::Message& message) override;
viz::FrameSinkId frame_sink_id_; base::RunLoop run_loop_;
base::RunLoop frame_sink_id_run_loop_;
std::unique_ptr<base::RunLoop> screen_space_rect_run_loop_; std::unique_ptr<base::RunLoop> screen_space_rect_run_loop_;
bool screen_space_rect_received_; bool screen_space_rect_received_;
......
...@@ -571,7 +571,7 @@ void RenderFrameProxy::SynchronizeVisualProperties() { ...@@ -571,7 +571,7 @@ void RenderFrameProxy::SynchronizeVisualProperties() {
// Let the browser know about the updated view rect. // Let the browser know about the updated view rect.
Send(new FrameHostMsg_SynchronizeVisualProperties( Send(new FrameHostMsg_SynchronizeVisualProperties(
routing_id_, frame_sink_id_, pending_visual_properties_)); routing_id_, pending_visual_properties_));
sent_visual_properties_ = pending_visual_properties_; sent_visual_properties_ = pending_visual_properties_;
TRACE_EVENT_WITH_FLOW2( 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