Break apart RenderWidgetHost::GetVisualProperties()
RenderWidgetHost::GetVisualProperties() was doing 3 separate things (1) Actually calculating the VisualProperties (2) Checking against the last stored VisualProperties to determine if the stored copy needs updating. (3) Determining if an ack should be expected if an update is eventually sent with the result of this function. This CL breaks it out into 3 new functions: GetVisualProperties() - Generates the VisualProperties. This should be const but too much of the call chain underneath it did not annotate their getters with const that annotating would be too annoying. DidVisualPropertiesSizeChange() - Helper function that extracts a common query used by DoesVisualPropertiesNeedAck() and StoredVisualPropertiesNeedsUpdate(). DoesVisualPropertiesNeedAck() - Returns true if sending the given VisualProperties update to the renderer will generate an ack. StoredVisualPropertiesNeedsUpdate() - Returns true if the stored copy of the VisualProperties is different enouhg from the incoming one that it needs an update. Bug: 998273 Change-Id: Ie8fee3ddedc1ea8b492765cb5b35e7bda99234de Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1773878 Commit-Queue: Albert J. Wong <ajwong@chromium.org> Reviewed-by:ccameron <ccameron@chromium.org> Cr-Commit-Position: refs/heads/master@{#691879}
Showing
This diff is collapsed.
Please register or sign in to comment