Use trilinear filtering and Cache render surface in overview mode. |
||||||||||||||||
Issue descriptionTo get better image quality when we are scaling down windows in overview mode, we can apply the trilinear filtering. At the same time we cache the render surface for good performance and reduced overdraw.
,
Aug 18 2017
+varkha@. Continue the discussion in the cl: When entering overview mode, we only call transform_window_.SetTransform [1] so there is no opacity animation, so no render surface. When existing overview mode, we do call additional SetOpacity [2], so we have opacity in the animation. Therefore we created the render surface? [1] https://cs.chromium.org/chromium/src/ash/wm/overview/window_selector_item.cc?l=677&rcl=65c8da95cbc89501e08ba28cd3bc9d308f20a026 [2] https://cs.chromium.org/chromium/src/ash/wm/overview/scoped_transform_overview_window.cc?l=197&rcl=6239bc6b7d27a33b9498fb237dd8a0553cfe3362
,
Aug 18 2017
#2, removed the SetOpacity here [1], can remove the render surface when exiting overview mode. And seems the SetOpacity does not do anything. [1] https://cs.chromium.org/chromium/src/ash/wm/overview/scoped_transform_overview_window.cc?l=197&rcl=6239bc6b7d27a33b9498fb237dd8a0553cfe3362
,
Aug 18 2017
I do see huge improvement by just cache the render surface during animation: 5 browser windows, 30x slow-down-compositiong-scale-factor=30 Linux builds: ~55% On Kevin, I must use long animation duration (10s) to see ~15% improvement.
,
Aug 18 2017
Does it still properly dim the items other than selected when text filter is on?
,
Aug 18 2017
#4, that's nice, what do the improvement numbers mean?
,
Aug 18 2017
#5, thanks, I see this SetOpacity for now. The caching render surface does not need to remove the code of SetOpacity. #6, sorry for the confusion. The numbers are: When I tested overview mode animation in linux builds, I opened 5 blank browsers, and to repeatedly draw render surface 30 times (which is to simulate slower machine), the mean of histogram Ash.WindowSelector.AnimationSmoothness.Enter was improved from 55% to 85%, about ~55% improvement.
,
Sep 8 2017
,
Oct 11 2017
We plan to turn on render surface caching and trilinear filtering in overview mode at the same time. The difficulty part is that to keep caching and filtering all there phases during overview mode: 1) entering animation, 2) staying in the overview mode, 3) exiting animation. There seems no single place we can add and remove the caching and filtering requests. But what we can do is do it multiple times: 1) + 2) can be achieved add/remove requests in ScopedTransformOverviewWindow::PrepareForOverview/RestoreWindow. For 3), we can add/remove requests on beginning/ending of the exiting animation. I wonder should we make the ui::Layer::SetTrilinearFiltering API similar to ui::Layer::AddCacheRenderSurfaceRequest with a request counter. And add rilinearFilteringObserver in scoped layer animation settings similar to RenderSurfaceObserver?
,
Oct 11 2017
,
Oct 11 2017
,
Oct 11 2017
,
Oct 12 2017
Add/Remove API is fine with me if that's the best solution here too.
,
Oct 12 2017
Maybe we make it a little complicated to Add/Remove trilinear request API. But just in case multiple places (and/or animations) try to set/unset the trilinear filtering on the same layer.
,
Oct 12 2017
,
Oct 12 2017
,
Oct 12 2017
The trilinear filtering results look terrific! Thanks reveman@!
,
Oct 13 2017
Uploaded a cl to: https://chromium-review.googlesource.com/c/chromium/src/+/717725 I had limited number of tests on how much the caching render surface + defer painting combination can improve the overview animation smoothness. On linux build (Z840), --slow-down-compositing-scale-factor=30, with 5 blank chrome browsers with maximized size. The 10 times of average results are about: ~33% improvement for enter animation. ~48% improvement for exit animation. Those number might be very different than real device and are different than in the comment of #7. UMA will let us know the real improvement later. Details are: enter/exit animation smoothness (%, 100% is ideal frame per second) 1. Current ToT code: 48.2%/41.2% 2. DeferPaint: 54.9%/43.0% 3. TrilinearFiltering: 45.8%/37.6% 4. DeferPaint + TrilinearFiltering: 52.4%/38.4% 5. CachingRenderSurface: 52.4%/50.8% 6. TrilinearFiltering + CachingRenderSurface: 54/1%/50.0% 7. DeferPaint + CachingRenderSurface: 65.3%/59.9% 8. DeferPaint + TrilinearFiltering + CachingRenderSurface: 64.2%/61.0%
,
Oct 13 2017
Really exciting to see all this come together! If we could get mipmaps and caching turned on for window switcher as well in M63 that would be awesome! Btw, we have one level of fullscreen overdraw in overview mode just because we dim the background using a solid color layer with opacity. I think we should switch that to setting brightness for the wallpaper layer instead and make sure the compositor implements that efficiently. We can probably use the color matrix like we're looking at doing for the night mode color temperature effect.
,
Oct 13 2017
# 19, sg! I will work on the wallpaper dimmer.
,
Oct 13 2017
#19, created other two issues for: Wallpaper dimmer in overview mode: https://bugs.chromium.org/p/chromium/issues/detail?id=774690 Using mipmaps and caching turned on for window switcher: https://bugs.chromium.org/p/chromium/issues/detail?id=773841
,
Oct 17 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2a577cfa8d7c87946f9335fe5ee831b322da7fda commit 2a577cfa8d7c87946f9335fe5ee831b322da7fda Author: wutao <wutao@chromium.org> Date: Tue Oct 17 01:05:59 2017 Use trilinear filtering and Cache render surface in overview mode. To get better image quality when we are scaling down windows in overview mode, we can apply the trilinear filtering. At the same time we cache the render surface for good performance and reduced overdraw. without trilinear filtering: with trilinear filtering: Bug: 756696 Test: Tested local Change-Id: I12765172efec921c9336b32f0aa3fa8ba7e78f35 Screenshot: https: //screenshot.googleplex.com/MYU3w3ff6s0 https: //screenshot.googleplex.com/AqGiVp4eh43 Reviewed-on: https://chromium-review.googlesource.com/717725 Reviewed-by: Scott Violet <sky@chromium.org> Reviewed-by: Valery Arkhangorodsky <varkha@chromium.org> Reviewed-by: David Reveman <reveman@chromium.org> Commit-Queue: Tao Wu <wutao@chromium.org> Cr-Commit-Position: refs/heads/master@{#509198} [modify] https://crrev.com/2a577cfa8d7c87946f9335fe5ee831b322da7fda/ash/wm/overview/scoped_overview_animation_settings.cc [modify] https://crrev.com/2a577cfa8d7c87946f9335fe5ee831b322da7fda/ash/wm/overview/scoped_overview_animation_settings.h [modify] https://crrev.com/2a577cfa8d7c87946f9335fe5ee831b322da7fda/ash/wm/overview/scoped_transform_overview_window.cc [modify] https://crrev.com/2a577cfa8d7c87946f9335fe5ee831b322da7fda/ash/wm/overview/scoped_transform_overview_window.h [modify] https://crrev.com/2a577cfa8d7c87946f9335fe5ee831b322da7fda/testing/buildbot/filters/ash_unittests_mash.filter [modify] https://crrev.com/2a577cfa8d7c87946f9335fe5ee831b322da7fda/testing/buildbot/filters/ash_unittests_mus.filter
,
Oct 17 2017
,
Oct 18 2017
Your change meets the bar and is auto-approved for M63. Please go ahead and merge the CL to branch 3239 manually. Please contact milestone owner if you have questions. Owners: cmasso@(Android), cmasso@(iOS), gkihumba@(ChromeOS), govind@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 18 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c4567563e222638c0d3c3f6d80be808614f34b7d commit c4567563e222638c0d3c3f6d80be808614f34b7d Author: wutao <wutao@chromium.org> Date: Wed Oct 18 01:47:27 2017 [Merge M63] Use trilinear filtering and Cache render surface in overview mode. To get better image quality when we are scaling down windows in overview mode, we can apply the trilinear filtering. At the same time we cache the render surface for good performance and reduced overdraw. TBR=reveman@chromium.org,varkha@chromium.org Bug: 756696 Test: Tested local Change-Id: I12765172efec921c9336b32f0aa3fa8ba7e78f35 Screenshot: https: //screenshot.googleplex.com/MYU3w3ff6s0 https: //screenshot.googleplex.com/AqGiVp4eh43 Reviewed-on: https://chromium-review.googlesource.com/717725 Reviewed-by: Scott Violet <sky@chromium.org> Reviewed-by: Valery Arkhangorodsky <varkha@chromium.org> Reviewed-by: David Reveman <reveman@chromium.org> Commit-Queue: Tao Wu <wutao@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#509198}(cherry picked from commit 2a577cfa8d7c87946f9335fe5ee831b322da7fda) Reviewed-on: https://chromium-review.googlesource.com/724740 Reviewed-by: Tao Wu <wutao@chromium.org> Cr-Commit-Position: refs/branch-heads/3239@{#42} Cr-Branched-From: adb61db19020ed8ecee5e91b1a0ea4c924ae2988-refs/heads/master@{#508578} [modify] https://crrev.com/c4567563e222638c0d3c3f6d80be808614f34b7d/ash/wm/overview/scoped_overview_animation_settings.cc [modify] https://crrev.com/c4567563e222638c0d3c3f6d80be808614f34b7d/ash/wm/overview/scoped_overview_animation_settings.h [modify] https://crrev.com/c4567563e222638c0d3c3f6d80be808614f34b7d/ash/wm/overview/scoped_transform_overview_window.cc [modify] https://crrev.com/c4567563e222638c0d3c3f6d80be808614f34b7d/ash/wm/overview/scoped_transform_overview_window.h [modify] https://crrev.com/c4567563e222638c0d3c3f6d80be808614f34b7d/testing/buildbot/filters/ash_unittests_mash.filter [modify] https://crrev.com/c4567563e222638c0d3c3f6d80be808614f34b7d/testing/buildbot/filters/ash_unittests_mus.filter
,
Mar 6 2018
|
||||||||||||||||
►
Sign in to add a comment |
||||||||||||||||
Comment 1 by wutao@chromium.org
, Aug 18 2017