viz: Fully invalidate entire frame on changing color usage
An earlier CL [1] attempted to fix a screen flickering issue with HDR content by expanding the damage rect to the entire frame if the color usage changes (e.g. SDR -> HDR). This fix, however, doesn't work when there is no damage on the frame (besides the color space change) because the expanded damage rect is eventually overwritten via an intersection with the 0-sized damage [2]. When the frame reports no damage, the draw is skipped entirely even though we should really be invalidating everything as per the original CL. This can be reproduced by playing an HDR video on YouTube in a background tab and then mousing over the tab. Chrome will process the HDR video frame in preparation to display the tab preview and the CompositorFrame is marked as "HDR" [4]. After the user mouses off the tab, Chrome will eventually stop processing the HDR video and will send a transitional "empty frame" [5] with an sRGB color space which triggers the problematic 0-damage DrawAndSwap mentioned above. At this point, the user will likely see the screen flicker black because the frame wasn't properly drawn. This CL updates SurfaceAggregator::Aggregate to stop overwriting the full-frame damage if the color space changes. [1] https://chromium-review.googlesource.com/c/chromium/src/+/2369441 [2] https://source.chromium.org/chromium/chromium/src/+/master:components/viz/service/display/surface_aggregator.cc;l=1758;drc=72b4db84824e257c412ac88a4941d12619a44dd2 [3] https://source.chromium.org/chromium/chromium/src/+/master:components/viz/service/display/display.cc;l=726;drc=cf4c5571a11fd0ce94bccbd867c65b75b28350ac [4] https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/platform/graphics/video_frame_submitter.cc;l=614;drc=72b4db84824e257c412ac88a4941d12619a44dd2 [5] https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/platform/graphics/video_frame_submitter.cc;l=388;drc=72b4db84824e257c412ac88a4941d12619a44dd2 Bug: 1132962 Change-Id: I03214c857d804b0a969e05db2853a0a5e9dadbf5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2453802 Commit-Queue: Brian Ho <hob@chromium.org> Reviewed-by:Daniele Castagna <dcastagna@chromium.org> Cr-Commit-Position: refs/heads/master@{#815213}
Showing
Please register or sign in to comment