Commit 04530582 authored by Jun Mukai's avatar Jun Mukai Committed by Commit Bot

Remove unnecessary SchedulePaint on BrowserNonClientFrameViewAsh

This SchedulePaint causes to request repaints of the entire
browser frame when overview-mode / splitview-mode changes. This
can cause significant load on GPU, especially when there are
many browser windows, and actually this is unnecessary because
View::SetVisible change invalidates the painting of its bounds.

I tried on nocturne with 15 browser windows; the toggle overview
by key changes the Overview.AnimationSmoothness histogram as;
- Enter: 18.9 -> 86.9
- Exit: 7.2 -> 61.3

Bug: 949227
Test: manually
Change-Id: I9a71776a66d4b609027d18c17f6796114fdb3f82
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1560019Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Jun Mukai <mukai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#649246}
parent b6397cf5
......@@ -757,9 +757,6 @@ bool BrowserNonClientFrameViewAsh::ShouldPaint() const {
void BrowserNonClientFrameViewAsh::OnOverviewOrSplitviewModeChanged() {
caption_button_container_->SetVisible(ShouldShowCaptionButtons());
// Schedule a paint to show or hide the header.
SchedulePaint();
}
std::unique_ptr<ash::FrameHeader>
......
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