Commit 5aad7aef authored by yoshiki iguchi's avatar yoshiki iguchi Committed by Commit Bot

Prevent instant blank on ARC notification during disappearing animation

Previously, the snapshot was displayed during disappearing animation.

We thought we were showing the recreated layer during the animation (see
L819). But that code didn't work for some reason and, actually the
shapshot was visible instead.

And after that, I added the code to hide snapshot correctly
(crrev.com/a128a1b9) and the issue became obvious.

This CL reverts the CL to hide snapshot (crrev.com/a128a1b9) for
temporary solution, and removes the unworking code (L819). I will
consider another solution later.

Bug: 890701
Change-Id: Ia5f1565408c2d13ceae6e9886a9cc1088bfed40b
Reviewed-on: https://chromium-review.googlesource.com/1256385Reviewed-by: default avatarTetsui Ohkubo <tetsui@chromium.org>
Commit-Queue: Yoshiki Iguchi <yoshiki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595730}
parent 1bfb3e9c
......@@ -414,11 +414,6 @@ void ArcNotificationContentView::SetSurface(ArcNotificationSurface* surface) {
if (surface_ == surface)
return;
// Set the flag to change the visibility of the snapshot on the background
// when the surface is set or unset. The surface sets while the window on
// Android side is visible.
bool need_to_update_snapshot = (surface_ == nullptr || surface == nullptr);
// Reset |floating_control_buttons_widget_| when |surface_| is changed.
floating_control_buttons_widget_.reset();
......@@ -453,10 +448,6 @@ void ArcNotificationContentView::SetSurface(ArcNotificationSurface* surface) {
AttachSurface();
}
}
// Schedules to draw the background (snapshot or a blank).
if (need_to_update_snapshot)
SchedulePaint();
}
void ArcNotificationContentView::UpdatePreferredSize() {
......@@ -814,8 +805,9 @@ void ArcNotificationContentView::OnWindowDestroying(aura::Window* window) {
}
void ArcNotificationContentView::OnWidgetClosing(views::Widget* widget) {
// Show copied surface, since the mask doesn't work correctly with closing
// animation (fade-out): https://crbug.com/811634.
// Actually this code doesn't show copied surface. Since it looks it doesn't
// work during closing. This just hides the surface and revails hidden
// snapshot: https://crbug.com/890701.
ShowCopiedSurface();
if (attached_widget_) {
......
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