Avoid unneeded swapchain recreation in Windows |
|
Issue descriptionChrome Version: (M71) OS: (Win10) These two kinds of swapchain recreation can be avoided or reduced. (1) switching between overlay and underlay from the same video (2) video resizing.
,
Dec 4
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/620efd1d06d880f5371c2e7eac8a034e43ce70d3 commit 620efd1d06d880f5371c2e7eac8a034e43ce70d3 Author: Sunny Sachanandani <sunnyps@chromium.org> Date: Tue Dec 04 20:22:19 2018 Use ResizeBuffers instead of recreating swap chains on resize This CL implements changing size, format, and flags for both root surface and video by calling ResizeBuffers. This is the recommended method for resizing, and doesn't seem to be prone to flashing, and other issues that require waiting for all commands to finish. However, the implementation has a fallback to recreating swap chain if ResizeBuffers fails, or when it can't be used e.g. for changing alpha blending mode. This seems fast enough to not need the resize after 30 frames workaround which is removed in this CL. This CL also includes cleanup of the root surface code so that it's not unnecessarily recreated on any change. Also, add a histogram to track resize failures and update the swap chain creation result histogram to emit an HRESULT error code so that we don't have to look at DumpWithCrashing dumps to figure that out. Bug: 885182 Change-Id: Ic6898c6adaaae7d74742a3c683d47663c54fd1c8 Reviewed-on: https://chromium-review.googlesource.com/c/1305198 Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org> Reviewed-by: Ilya Sherman <isherman@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Cr-Commit-Position: refs/heads/master@{#613674} [modify] https://crrev.com/620efd1d06d880f5371c2e7eac8a034e43ce70d3/gpu/ipc/service/direct_composition_child_surface_win.cc [modify] https://crrev.com/620efd1d06d880f5371c2e7eac8a034e43ce70d3/gpu/ipc/service/direct_composition_child_surface_win.h [modify] https://crrev.com/620efd1d06d880f5371c2e7eac8a034e43ce70d3/gpu/ipc/service/direct_composition_surface_win.cc [modify] https://crrev.com/620efd1d06d880f5371c2e7eac8a034e43ce70d3/gpu/ipc/service/direct_composition_surface_win.h [modify] https://crrev.com/620efd1d06d880f5371c2e7eac8a034e43ce70d3/gpu/ipc/service/direct_composition_surface_win_unittest.cc [modify] https://crrev.com/620efd1d06d880f5371c2e7eac8a034e43ce70d3/gpu/ipc/service/image_transport_surface_win.cc [modify] https://crrev.com/620efd1d06d880f5371c2e7eac8a034e43ce70d3/tools/metrics/histograms/histograms.xml |
|
►
Sign in to add a comment |
|
Comment 1 by bugdroid1@chromium.org
, Oct 4