Commit f548b06c authored by Maggie Chen's avatar Maggie Chen Committed by Commit Bot

Fix a bug that video controls don't completely disappear in full screen mode

The Direct Composition Visual tree should be rebuilt after switching between
overlay and underlay. Because the old code didn't do this, the swap chain is
still in underlay mode after switching from underlay to overlay. Thus, the
video controls from the last underlay frame still shows on the later overlay
frames.

Bug: 978203, 974344
Change-Id: If179fc07de6a2a9580234310e25f90221a06fc12
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1697312Reviewed-by: default avatarZhenyao Mo <zmo@chromium.org>
Reviewed-by: default avatarSunny Sachanandani <sunnyps@chromium.org>
Commit-Queue: Maggie Chen <magchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#676603}
parent d5dcc32f
......@@ -474,6 +474,11 @@ void SwapChainPresenter::UpdateVisuals(const ui::DCRendererLayerParams& params,
clip_visual_->SetClip(nullptr);
}
}
if (visual_info_.z_order != params.z_order) {
visual_info_.z_order = params.z_order;
layer_tree_->SetNeedsCommit();
}
}
bool SwapChainPresenter::TryPresentToDecodeSwapChain(
......
......@@ -185,6 +185,7 @@ class SwapChainPresenter {
gfx::Transform transform;
bool is_clipped = false;
gfx::Rect clip_rect;
int z_order = 0;
} visual_info_;
// Direct composition visual containing the swap chain content. Child of
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment