Commit aed58a45 authored by Mitsuru Oshima's avatar Mitsuru Oshima Committed by Commit Bot

Make old layer always non opaque

This is cleaner tha altering opacity.

Bug: 1147187

Change-Id: I7b547b570f06280b6dfccb8ac62afe160151f0f8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2525363Reviewed-by: default avatarMalay Keshav <malaykeshav@chromium.org>
Commit-Queue: Mitsuru Oshima <oshima@chromium.org>
Cr-Commit-Position: refs/heads/master@{#828081}
parent 25852494
......@@ -129,14 +129,16 @@ class FrameHeader::FrameAnimatorView : public views::View,
new_layer->SetName(old_layer->name());
old_layer->SetName(old_layer->name() + ":Old");
old_layer->SetTransform(gfx::Transform());
// Layer in maximized / fullscreen / snapped state is set to
// opaque, which can prevent resterizing the new layer immediately.
old_layer->SetFillsBoundsOpaquely(false);
layer_owner_ = std::move(old_layer_owner);
AddLayerBeneathView(old_layer);
// The old layer is on top and should fade out. Make it non opaque
// so that new layer gets resterized immediately.
old_layer->SetOpacity(0.99f);
// The old layer is on top and should fade out.
old_layer->SetOpacity(1.f);
new_layer->SetOpacity(1.f);
{
ui::ScopedLayerAnimationSettings settings(old_layer->GetAnimator());
......
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