The SurfaceSynchronization/VizDisplayCompositor features on Android mean that the browser is no longer notified of every frame update the renderer makes. Instead we only notify the browser if we think that the frame update will impact the browser's rendering.
This means that we no longer consistently deliver page scroll percentage updates to the browser, breaking the ContextualSuggestionsMediator's page scroll percentage handling and ContextualSuggestionTest's testPeekWithPageScrollPercentage case.
Page-scroll percentage based contextual suggestions are currently disabled, but we may want to re-enable in the future.
While we could deliver every scroll update to the browser, this requires an extra IPC per frame and seems pretty inefficient, especially if not being used. Instead, it feels like we might be able to take one of the following approaches:
- If we don't plan to use this info in the near future and are just interested in
page scroll percentage for UKM, we could probably log the same UKM from the
renderer process.
- If we do want to use this info in the future, we could:
- Send the renderer a target page scroll percentage we're interested in and
have the renderer only notify when we cross that threshold.
- Have the renderer update the browser at a lower granularity (every 10%
change in page scroll percentage)
- Only send page scroll percentages in cases where we have a contextual
suggestion and need the data (still inefficient, but a bit more scoped,
may be OK if contextual suggestions are somewhat rare).
Comment 1 by bugdroid1@chromium.org
, Aug 23