Fix blank page after switching out of simplified view
Sometimes EmbedSurface is called right before WasShown when the tab is hidden. When frame evictor is notified of this new surface, it might immediately evict it because it doesn't know the tab will be visible soon. This will result in an evicted surface getting embedded which will show blank. Do two things: - Only call SwappedFrame when the tab is visible so don't have the problem mention above. Generally there is no point in calling SwappedFrame when it's invisible because even though a new id is allocated, there will not be any CompositorFrames submitted to this surface until the tab is shown, so there is no point in notifying the frame evictor. - Notify RHWVAndroid via WasEvicted when the surface is evicted so that it can allocate a new id for the next time it's shown. Bug: 896633,893731 Change-Id: I6fbc339f606d70e65ecc79b0f74bcd44133bd4fc Reviewed-on: https://chromium-review.googlesource.com/c/1289953 Commit-Queue: Saman Sami <samans@chromium.org> Reviewed-by:Khushal <khushalsagar@chromium.org> Reviewed-by:
Fady Samuel <fsamuel@chromium.org> Cr-Commit-Position: refs/heads/master@{#601408}
Showing
Please register or sign in to comment