New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 672929 link

Starred by 7 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 680636
issue 732568



Sign in to add a comment

SurfaceAggregator Draw Occlusion

Project Member Reported by fsam...@chromium.org, Dec 9 2016

Issue description

We should discard DrawQuads that are entirely occluded in SurfaceAggregator to avoid some draw work. This would happen post-SurfaceId expansion.
 
Blocking: 672303
Labels: Pri-2
Owner: danakj@chromium.org
Status: Assigned (was: Untriaged)
+danakj@ for triage

Comment 4 by danakj@chromium.org, Dec 19 2016

> We should discard DrawQuads that are entirely occluded in SurfaceAggregator to avoid some draw work.

It's not only this, we determine occlusion and draw the bounding box around the visible part of the quad. Right now we compute this in LTHI and store it on the quad as the visible rect. We would stop setting it there and instead set it as part of aggregation I suppose.

Comment 5 by danakj@chromium.org, Jan 12 2017

Blocking: 680636
Labels: -Pri-2 Pri-1
I've raised the priority on this issue because we've (reveman@) identified that overdraw is an issue on Chrome OS.
Cc: reve...@chromium.org

Comment 9 by danakj@chromium.org, Jan 13 2017

Only if you have a window partially overlapping another window though. We confirmed when a window is fully occluded things work. I a little bit think we're overreacting?
Going back to the issue blocked by this, I think "Background windows along side a larger foreground window have double overdraw." is higher priority to fix as that's causing effects like overview window switching to be janky on most devices even after fixing all other issues with overview mode.

In general I think it's more important to improve occlusion culling now with the introduction of Android apps on ChromeOS as that made it more common that users have multiple windows open that are not maximized but I'm not sure if that makes this P1 or not.


Labels: -Pri-1 Pri-2
Ohh sorry, yea, this isn't P1. I wanted to distinguish default priorities from things we'd like done soonish then I realized I already did that in December (the default priority is P3 not P2, I forgot). I think we do want to finish this this quarter, but this isn't P1.
Blocking: 601863

Comment 13 by xing...@intel.com, Feb 6 2017

Cc: xing...@intel.com
Cc: yiyix@chromium.org

Comment 15 by yiyix@chromium.org, Apr 27 2017

Status: Started (was: Assigned)

Comment 16 by yiyix@chromium.org, Apr 28 2017

Owner: yiyix@chromium.org
Cc: jam...@chromium.org jbau...@chromium.org
 Issue 475780  has been merged into this issue.
Blocking: -672303 -601863 732568
Cc: sky@chromium.org weiliangc@chromium.org varkha@chromium.org vollick@chromium.org
 Issue 646195  has been merged into this issue.
Cc: fsam...@chromium.org
 Issue 654075  has been merged into this issue.
Project Member

Comment 21 by bugdroid1@chromium.org, Aug 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7167aee073a77caf21b1cf1c4d9bc3288460c1d3

commit 7167aee073a77caf21b1cf1c4d9bc3288460c1d3
Author: yiyix <yiyix@chromium.org>
Date: Sat Aug 19 01:28:42 2017

Use DrawQuad::needs_blending to replace opaque_rect

DrawQuad::opaque_rect and DrawQuad::needs_blending are both used to compute
whether a particular DrawQuad needs blending or not. It should be sufficient
to use only needs_blending to keep track of it.

In this cl, opaque_rect is used to set needs_blending to prove that removal
of opaque_rect will not cause any regression.

A detailed explanation and analysis can be found here:
https://docs.google.com/document/d/1kT9a-t6tVaotSVCr-J0kYALwiDLLl_UwIZJiSP39F2I

Bug:672929

Bug: 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I89bbc740cc125ee42d086b52c34a12fcfe401cc2
Reviewed-on: https://chromium-review.googlesource.com/618020
Commit-Queue: Yi Xu <yiyix@chromium.org>
Reviewed-by: weiliangc <weiliangc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495781}
[modify] https://crrev.com/7167aee073a77caf21b1cf1c4d9bc3288460c1d3/cc/output/overlay_unittest.cc
[modify] https://crrev.com/7167aee073a77caf21b1cf1c4d9bc3288460c1d3/cc/quads/draw_quad.cc
[modify] https://crrev.com/7167aee073a77caf21b1cf1c4d9bc3288460c1d3/cc/quads/draw_quad.h
[modify] https://crrev.com/7167aee073a77caf21b1cf1c4d9bc3288460c1d3/cc/trees/layer_tree_host_impl_unittest.cc

Blocking: 704287
Blocking: -704287
Unblocking issue 704287 (it should be possible to start writing overdraw tests in ash without having the draw occlusion).
Blocking: 759163
Blocking: -759163
Project Member

Comment 26 by bugdroid1@chromium.org, Sep 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/10141eca52eaf93cff71de95eae1067c559b875e

commit 10141eca52eaf93cff71de95eae1067c559b875e
Author: yiyix <yiyix@chromium.org>
Date: Tue Sep 05 20:36:52 2017

Add a new field "are_contents_opaque" To SharedQuadState

Adding a new field, are_contents_opaque, to SharedQuadState (SQS), which
is set to true if and only if all the draw quads that share the same SQS
only contains opaque content. This field will be used to determine if the
visible rect created by a particular SQS is opaque, which will be used to
occlude draw quads behind it to improve draw occulsion in the futre.

TBR=qinmin@chromium.org

TEST= Adding verification SQS::are_contents_opaque to all sqs related tests.

Bug:  672929 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I922ac85b84c5e4b39881c6f0c8e47a92802d397d
Reviewed-on: https://chromium-review.googlesource.com/585604
Commit-Queue: Yi Xu <yiyix@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: David Reveman <reveman@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499740}
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/android_webview/browser/surfaces_instance.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/ash/fast_ink/fast_ink_view.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/cc/ipc/cc_param_traits_unittest.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/cc/ipc/cc_serialization_perftest.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/cc/layers/heads_up_display_layer_impl.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/cc/layers/layer_impl.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/cc/layers/layer_impl.h
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/cc/layers/nine_patch_layer_impl.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/cc/layers/nine_patch_layer_impl_unittest.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/cc/layers/painted_overlay_scrollbar_layer_impl.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/cc/layers/painted_scrollbar_layer_impl.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/cc/layers/painted_scrollbar_layer_impl_unittest.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/cc/layers/picture_layer_impl.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/cc/layers/picture_layer_impl_unittest.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/cc/layers/render_surface_impl.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/cc/layers/render_surface_unittest.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/cc/layers/solid_color_layer_impl.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/cc/layers/solid_color_layer_impl_unittest.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/cc/layers/solid_color_scrollbar_layer_impl.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/cc/layers/surface_layer_impl.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/cc/layers/texture_layer_impl.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/cc/layers/ui_resource_layer_impl.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/cc/layers/ui_resource_layer_impl_unittest.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/cc/layers/video_layer_impl.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/cc/output/dc_layer_overlay.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/cc/output/renderer_pixeltest.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/cc/output/software_renderer_unittest.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/cc/quads/draw_quad_perftest.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/cc/quads/draw_quad_unittest.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/cc/quads/render_pass_unittest.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/cc/test/render_pass_test_utils.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/cc/trees/layer_tree_host_impl.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/cc/trees/layer_tree_host_impl_unittest.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/components/exo/surface.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/components/viz/common/quads/shared_quad_state.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/components/viz/common/quads/shared_quad_state.h
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/components/viz/service/display/gl_renderer_unittest.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/components/viz/service/display/surface_aggregator.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/components/viz/service/display/surface_aggregator_pixeltest.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/components/viz/service/display/surface_aggregator_unittest.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/components/viz/test/surface_hittest_test_helpers.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/content/renderer/android/synchronous_layer_tree_frame_sink.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/services/ui/ws/frame_generator.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/services/viz/public/cpp/compositing/shared_quad_state_struct_traits.h
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/services/viz/public/cpp/compositing/struct_traits_unittest.cc
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/services/viz/public/interfaces/compositing/shared_quad_state.mojom
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
[modify] https://crrev.com/10141eca52eaf93cff71de95eae1067c559b875e/third_party/WebKit/Source/platform/graphics/VideoFrameResourceProvider.cpp

Project Member

Comment 27 by bugdroid1@chromium.org, Oct 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bdfa9a0b9a8f7e5704d479d957fe25d675aea4be

commit bdfa9a0b9a8f7e5704d479d957fe25d675aea4be
Author: yiyix <yiyix@chromium.org>
Date: Mon Oct 23 22:21:47 2017

Optimize overdraw on partially overlapped windows

Overdraw means that one single pixel is drawn more than once, this can
slow down our chrome browser performance; and this causes our browser
to use more power to run. In this patch, a new draw occlusion tracker
to remove DrawQuads that are not shown on the screen from the
CompositorFrame is added.
For detailed description:
https://docs.google.com/document/d/1skSwTc7fDr_O_pYz1mH4hV7QtMkzAOhhKf5Qr4FQx2I/edit

TEST=display_unittest.cc

Bug:  672929 
Change-Id: I910597230c432450eabbef8166cab2cb9d3925ac
Reviewed-on: https://chromium-review.googlesource.com/711391
Commit-Queue: Yi Xu <yiyix@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Ilya Sherman <isherman@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510942}
[modify] https://crrev.com/bdfa9a0b9a8f7e5704d479d957fe25d675aea4be/chrome/browser/about_flags.cc
[modify] https://crrev.com/bdfa9a0b9a8f7e5704d479d957fe25d675aea4be/chrome/browser/flag_descriptions.cc
[modify] https://crrev.com/bdfa9a0b9a8f7e5704d479d957fe25d675aea4be/chrome/browser/flag_descriptions.h
[modify] https://crrev.com/bdfa9a0b9a8f7e5704d479d957fe25d675aea4be/components/viz/common/display/renderer_settings.h
[modify] https://crrev.com/bdfa9a0b9a8f7e5704d479d957fe25d675aea4be/components/viz/host/renderer_settings_creation.cc
[modify] https://crrev.com/bdfa9a0b9a8f7e5704d479d957fe25d675aea4be/components/viz/service/display/display.cc
[modify] https://crrev.com/bdfa9a0b9a8f7e5704d479d957fe25d675aea4be/components/viz/service/display/display.h
[modify] https://crrev.com/bdfa9a0b9a8f7e5704d479d957fe25d675aea4be/components/viz/service/display/display_unittest.cc
[modify] https://crrev.com/bdfa9a0b9a8f7e5704d479d957fe25d675aea4be/tools/metrics/histograms/histograms.xml
[modify] https://crrev.com/bdfa9a0b9a8f7e5704d479d957fe25d675aea4be/ui/base/ui_base_switches.cc
[modify] https://crrev.com/bdfa9a0b9a8f7e5704d479d957fe25d675aea4be/ui/base/ui_base_switches.h

Project Member

Comment 28 by bugdroid1@chromium.org, Nov 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/afc2fea94f3cb386c8e606d4f9320248c84d5ef8

commit afc2fea94f3cb386c8e606d4f9320248c84d5ef8
Author: yiyix <yiyix@chromium.org>
Date: Tue Nov 21 20:16:56 2017

Optimize Draw Occlusion algorithm

This patch is aimed to reduce the running time of draw occlusion algorithm.
In draw occlusion, quad++ is used to increase the iterator pointer to
visit the next draw quad. In reality, the quad++ calls
cc::ListContainer::Iterator::operator++ and creates a new Iterator which
points at the next draw quad. As a result, quad++ is always the top 3
expensive line in draw occlusion.

BEFORE:
91.61% viz::Display::RemoveOverdrawQuads(CompositorFrame)
  32.21% cc::ListContainer::viz::DrawQuad::Iterator
  29.26% cc::ListContainer::viz::SharedQuadState::end
  7.42% cc::ListContainerHelper::PositionInCharAllocator
  4.40% cc::ListContainer::viz::SharedQuadState::begin
  4.23% gfx::Transform(SkMatrix44)
  1.59% cc::ListContainer::viz::SharedQuadState::Iterator


AFTER:
91.51% viz::Display::RemoveOverdrawQuads(CompositorFrame)
 83.37% viz::Display::RemoveOverdrawQuads(CompositorFrame)
   32.04% cc::ListContainer::viz::SharedQuadState::end
   29.08% cc::ListContainer::viz::SharedQuadState::ConstIterator
   7.54% cc::ListContainerHelper::PositionInCharAllocator
   4.75% cc::ListContainer::viz::SharedQuadState::begin
   4.35% gfx::Transform(SkMatrix44)
   0.99% cc::ListContainer::viz::SharedQuadState::ReverseIterator

ref: https://docs.google.com/document/d/1gM4h1ca2jDWdXbYa9yjC53m0sJzaT9skqbPGnfDsdyI
Bug:  672929 
Change-Id: I377ab3af3fdfa7e3d7ceb42dcfc2056de149424d
Reviewed-on: https://chromium-review.googlesource.com/782063
Commit-Queue: Yi Xu <yiyix@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518358}
[modify] https://crrev.com/afc2fea94f3cb386c8e606d4f9320248c84d5ef8/components/viz/service/display/display.cc

Cc: -mfomitchev@chromium.org
Project Member

Comment 30 by bugdroid1@chromium.org, Nov 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b9dbee4431e2d147ef15cad3c2a7f576f71ac5f0

commit b9dbee4431e2d147ef15cad3c2a7f576f71ac5f0
Author: yiyix <yiyix@chromium.org>
Date: Wed Nov 22 18:17:57 2017

Optimize Draw Occlusion algorithm

This patch is aimed to reduce the running time of draw occlusion algorithm.
In draw occlusion algorithm, I used a for loop to iterate through every
draw quad where each draw quad is compared with quad_list.end(). As a
result, quad_list.end() is called every time and it gets expensive with
more draw quads. In this patch, I saved the value of quad_list.end()
instead of keep accessing it.

Before:
91.51% viz::Display::RemoveOverdrawQuads(CompositorFrame)
 83.37% viz::Display::RemoveOverdrawQuads(CompositorFrame)
   32.04% cc::ListContainer::viz::SharedQuadState::end
   29.08% cc::ListContainer::viz::SharedQuadState::ConstIterator
   7.54% cc::ListContainerHelper::PositionInCharAllocator
   4.75% cc::ListContainer::viz::SharedQuadState::begin
   4.35% gfx::Transform(SkMatrix44)
   0.99% cc::ListContainer::viz::SharedQuadState::ReverseIterator


After:
88.48% viz::Display::RemoveOverdrawQuads(CompositorFrame)
  79.31% viz::Display::RemoveOverdrawQuads(CompositorFrame)
  45.75% cc::ListContainer::viz::SharedQuadState::ConstIterator
  11.49% cc::ListContainerHelper::PositionInCharAllocator
   6.58% gfx::Transform(SkMatrix44)
   6.41% cc::ListContainer::viz::SharedQuadState::begin
   4.00% cc::ListContainer::viz::SharedQuadState::end

ref: https://docs.google.com/document/d/1gM4h1ca2jDWdXbYa9yjC53m0sJzaT9skqbPGnfDsdyI

Bug:  672929 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: Icc717ad861faa602c22aaef4d35829cf1127f0a5
Reviewed-on: https://chromium-review.googlesource.com/783799
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Yi Xu <yiyix@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518682}
[modify] https://crrev.com/b9dbee4431e2d147ef15cad3c2a7f576f71ac5f0/components/viz/service/display/display.cc

Project Member

Comment 31 by bugdroid1@chromium.org, Dec 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4e528a1d4fc05e87ae2abe16129a9126c4ff9f46

commit 4e528a1d4fc05e87ae2abe16129a9126c4ff9f46
Author: yiyix <yiyix@chromium.org>
Date: Thu Dec 14 16:50:52 2017

fix flag --enable-draw-occlusion

Users are now able to turn on draw occlusion by set flag enable draw occlusion
to true in chrome://flags.

TEST: build to chrome os device and verify if draw occlusion is turned on when
the flag is set to true.

Bug:  672929 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: Ibfca7fd5f91a8f7c04ea20db62029b0ab3a78870
Reviewed-on: https://chromium-review.googlesource.com/826103
Commit-Queue: Yi Xu <yiyix@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524088}
[modify] https://crrev.com/4e528a1d4fc05e87ae2abe16129a9126c4ff9f46/chrome/browser/about_flags.cc
[modify] https://crrev.com/4e528a1d4fc05e87ae2abe16129a9126c4ff9f46/services/viz/privileged/interfaces/compositing/renderer_settings.mojom
[modify] https://crrev.com/4e528a1d4fc05e87ae2abe16129a9126c4ff9f46/services/viz/privileged/interfaces/compositing/renderer_settings_struct_traits.cc
[modify] https://crrev.com/4e528a1d4fc05e87ae2abe16129a9126c4ff9f46/services/viz/privileged/interfaces/compositing/renderer_settings_struct_traits.h
[modify] https://crrev.com/4e528a1d4fc05e87ae2abe16129a9126c4ff9f46/services/viz/privileged/interfaces/struct_traits_unittest.cc
[modify] https://crrev.com/4e528a1d4fc05e87ae2abe16129a9126c4ff9f46/tools/metrics/histograms/enums.xml

Project Member

Comment 32 by bugdroid1@chromium.org, Jan 5 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d289ca8d3c15a2d9a4548858205d5150a912f374

commit d289ca8d3c15a2d9a4548858205d5150a912f374
Author: yiyix <yiyix@chromium.org>
Date: Fri Jan 05 07:56:00 2018

Update DrawQuad size when DrawQuad is partially shown

This is the second patch for draw occlusion work. In the previous patch,
draw quad is removed from compositor frame when they are not shown on
screen (https://chromium-review.googlesource.com/c/chromium/src/+/711391).
In this patch, when a Draw quad is partially showing on the screen,
DrawQuad::visible_rect is updated to the visible bounds that is shown on
screen.

Bug:672929

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: Ibdb089dff0fabb86ce0fbb62c4a512bba5f60575
Reviewed-on: https://chromium-review.googlesource.com/813375
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Yi Xu <yiyix@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527240}
[modify] https://crrev.com/d289ca8d3c15a2d9a4548858205d5150a912f374/components/viz/service/display/display.cc
[modify] https://crrev.com/d289ca8d3c15a2d9a4548858205d5150a912f374/components/viz/service/display/display_unittest.cc

Project Member

Comment 33 by bugdroid1@chromium.org, Feb 11 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/374d3a7593027eb6b26bf290e387e7de1fa9612a

commit 374d3a7593027eb6b26bf290e387e7de1fa9612a
Author: yiyix <yiyix@chromium.org>
Date: Sun Feb 11 09:21:22 2018

Add Metrics to measure effectiveness of Draw Occlusion

In this patch, I added some metrics to measure effectiveness of draw occlusion
so that we can get more meaningful data from finch trials. Metrics added
includes measuring the number of quads that are removed or resized, total
area of drawing that are skipped, and total number draw quads that need to
go through complex transforms.

Bug:672929

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I354c95a3ac5525ab81694ad67f4f1b183c86f0cb
Reviewed-on: https://chromium-review.googlesource.com/898342
Commit-Queue: Yi Xu <yiyix@chromium.org>
Reviewed-by: Robert Kaplow <rkaplow@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536001}
[modify] https://crrev.com/374d3a7593027eb6b26bf290e387e7de1fa9612a/components/viz/service/display/display.cc
[modify] https://crrev.com/374d3a7593027eb6b26bf290e387e7de1fa9612a/tools/metrics/histograms/histograms.xml

Project Member

Comment 34 by bugdroid1@chromium.org, Feb 13 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/050d236867ab5a877ab98ff4c37e3b7ef9aef09e

commit 050d236867ab5a877ab98ff4c37e3b7ef9aef09e
Author: yiyix <yiyix@chromium.org>
Date: Tue Feb 13 22:36:45 2018

Draw Occlusion: Use base::Feature to prepare for Finch Trial

This CL adds a base::Feature for DrawOcclusion so that it can be triggered
in the wild by a Finch trial, i.e., by using --enable-features=DrawOcclusion

Bug:  672929 

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I6ccaa3cdadc254200fe726da0e95259630a0498a
Reviewed-on: https://chromium-review.googlesource.com/914882
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Yi Xu <yiyix@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536521}
[modify] https://crrev.com/050d236867ab5a877ab98ff4c37e3b7ef9aef09e/components/viz/common/features.cc
[modify] https://crrev.com/050d236867ab5a877ab98ff4c37e3b7ef9aef09e/components/viz/common/features.h
[modify] https://crrev.com/050d236867ab5a877ab98ff4c37e3b7ef9aef09e/components/viz/host/DEPS
[modify] https://crrev.com/050d236867ab5a877ab98ff4c37e3b7ef9aef09e/components/viz/host/renderer_settings_creation.cc

Project Member

Comment 35 by bugdroid1@chromium.org, Feb 22 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a510f0e89252c03338b2daa18eee5fd2f3b1aef1

commit a510f0e89252c03338b2daa18eee5fd2f3b1aef1
Author: yiyix <yiyix@chromium.org>
Date: Thu Feb 22 07:24:20 2018

Increase metrics upper limit for Compositing.Display.Draw.Occlusion.Drawing.Area.Saved

At 95th percentile, draw occlusion saves more than 1000px overdraw as shown in UMA.
Update the metrics limit to 10000 instead.

uma: https://uma.googleplex.com/p/chrome/timeline_v2/?sid=a33525a93b77ce9055ac511820de6d0b

Bug:  672929 

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: Idc6356184738f44389f5bfe622e1983b4bdfacbe
Reviewed-on: https://chromium-review.googlesource.com/930027
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Yi Xu <yiyix@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538375}
[modify] https://crrev.com/a510f0e89252c03338b2daa18eee5fd2f3b1aef1/components/viz/service/display/display.cc

Project Member

Comment 36 by bugdroid1@chromium.org, Feb 28 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b8da95032e5eab87a1d19558e54e5ee6fdfa04c7

commit b8da95032e5eab87a1d19558e54e5ee6fdfa04c7
Author: yiyix <yiyix@chromium.org>
Date: Wed Feb 28 05:38:46 2018

DrawOcclusion: Add metrics on DrawQuad size to understand users better

DrawOcclusion finch trial has been enabled for 1 week now and DrawOcclusion
running time of 99th percentile is 5 times more than 95th percentile. We
believe that this is because the increasing number of drawquads that need
to go through the expensive complex transform. In this patch I added a
new metrics Compositing.Display.Draw.Quads.Area.With.Complex.Transform to
understand better those DrawQuads size.

Bug:  672929 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I9ab3e5a29976d8c7f3239c45a43f0fb2895d69a3
Reviewed-on: https://chromium-review.googlesource.com/935683
Commit-Queue: Yi Xu <yiyix@chromium.org>
Reviewed-by: Mark Pearson <mpearson@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539722}
[modify] https://crrev.com/b8da95032e5eab87a1d19558e54e5ee6fdfa04c7/components/viz/service/display/display.cc
[modify] https://crrev.com/b8da95032e5eab87a1d19558e54e5ee6fdfa04c7/tools/metrics/histograms/histograms.xml

Project Member

Comment 37 by bugdroid1@chromium.org, Mar 18 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d3838f77bb656eb382a65cc86c5ed5cf3ad84105

commit d3838f77bb656eb382a65cc86c5ed5cf3ad84105
Author: yiyix <yiyix@chromium.org>
Date: Sun Mar 18 05:55:50 2018

Draw Occlusion: Remove metrics added for collecting data in Finch trial

As the Finch trial for draw occlusion has successfully completed, remove
all metrics that added for collecting user data, including
Display.Draw.Quads.Resized, Display.Draw.Quads.Skipped,
Display.Draw.Quads.Smaller, Display.Draw.Quads.With.Complex.Transform,
Display.Draw.Quads.With.Complex.Transform.Area.

Bug:  672929 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I792cec955827a04e9a39968beb685f121b0669db
Reviewed-on: https://chromium-review.googlesource.com/967061
Reviewed-by: Mark Pearson <mpearson@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Yi Xu <yiyix@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543952}
[modify] https://crrev.com/d3838f77bb656eb382a65cc86c5ed5cf3ad84105/components/viz/service/display/display.cc
[modify] https://crrev.com/d3838f77bb656eb382a65cc86c5ed5cf3ad84105/tools/metrics/histograms/histograms.xml

Project Member

Comment 38 by bugdroid1@chromium.org, Mar 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ab34a89965a54a64b594463aabd9320ddde1960e

commit ab34a89965a54a64b594463aabd9320ddde1960e
Author: yiyix <yiyix@chromium.org>
Date: Tue Mar 20 20:10:08 2018

Draw Occlusion: Enable Draw Occlusion by Default

Draw Occlusion is turned on by default for 50% of Canary and Dev
users on Mac, Linux, ChromeOS and Windows in a Finch trial. It shows
that it can save over 1M pixels of overdraw for the top 1 percent
users and helped with overall DrawFrame time as well. Since it did
not cause any regression or any bug during the finch trial, this
patch is desired to turn it on by default.

Bug:  672929 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I1952e38347207a9dbdd26e545dadfef00239c48e
Reviewed-on: https://chromium-review.googlesource.com/969412
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Yi Xu <yiyix@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544500}
[modify] https://crrev.com/ab34a89965a54a64b594463aabd9320ddde1960e/components/viz/common/features.cc

Project Member

Comment 39 by bugdroid1@chromium.org, Mar 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/dba06ed373213159bd6f8d43277614197dc2aa6f

commit dba06ed373213159bd6f8d43277614197dc2aa6f
Author: yiyix <yiyix@chromium.org>
Date: Tue Mar 20 22:30:11 2018

Draw Occlusion: Fix Histogram for missing metrics

Compositing.Display.Draw.Quads.Removed was added in the code, but
missing in the histogram.xml file.

Bug:672929

Change-Id: I5a90e946871320b3414667db51ee8ee83ad7366d
Reviewed-on: https://chromium-review.googlesource.com/970162
Reviewed-by: Mark Pearson <mpearson@chromium.org>
Commit-Queue: Yi Xu <yiyix@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544566}
[modify] https://crrev.com/dba06ed373213159bd6f8d43277614197dc2aa6f/tools/metrics/histograms/histograms.xml

Project Member

Comment 40 by bugdroid1@chromium.org, Mar 21 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4562066e398dff2ed1d9c94b786162011450cc47

commit 4562066e398dff2ed1d9c94b786162011450cc47
Author: Fady Samuel <fsamuel@chromium.org>
Date: Wed Mar 21 13:19:47 2018

Revert "Draw Occlusion: Enable Draw Occlusion by Default"

This reverts commit ab34a89965a54a64b594463aabd9320ddde1960e.

Reason for revert: This CL broke resize when surface sync is enabled (by default on M66+). Most quads seem to be dropped during resize.

Original change's description:
> Draw Occlusion: Enable Draw Occlusion by Default
> 
> Draw Occlusion is turned on by default for 50% of Canary and Dev
> users on Mac, Linux, ChromeOS and Windows in a Finch trial. It shows
> that it can save over 1M pixels of overdraw for the top 1 percent
> users and helped with overall DrawFrame time as well. Since it did
> not cause any regression or any bug during the finch trial, this
> patch is desired to turn it on by default.
> 
> Bug:  672929 
> Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
> Change-Id: I1952e38347207a9dbdd26e545dadfef00239c48e
> Reviewed-on: https://chromium-review.googlesource.com/969412
> Reviewed-by: danakj <danakj@chromium.org>
> Commit-Queue: Yi Xu <yiyix@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#544500}

TBR=danakj@chromium.org,yiyix@chromium.org

Change-Id: I9cfbe739efdee24749be05a1f67ebb656a00b9d5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  672929 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Reviewed-on: https://chromium-review.googlesource.com/973341
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Commit-Queue: Fady Samuel <fsamuel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544676}
[modify] https://crrev.com/4562066e398dff2ed1d9c94b786162011450cc47/components/viz/common/features.cc

Project Member

Comment 41 by bugdroid1@chromium.org, Mar 28 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e05ba4c58bde7423528fbb71f61b74543bae919c

commit e05ba4c58bde7423528fbb71f61b74543bae919c
Author: yiyix <yiyix@chromium.org>
Date: Wed Mar 28 03:33:37 2018

Reland "Draw Occlusion: Enable Draw Occlusion by Default"

This is a reland of ab34a89965a54a64b594463aabd9320ddde1960e

TBR=danakj@chromium.org

Original change's description:
> Draw Occlusion: Enable Draw Occlusion by Default
>
> Draw Occlusion is turned on by default for 50% of Canary and Dev
> users on Mac, Linux, ChromeOS and Windows in a Finch trial. It shows
> that it can save over 1M pixels of overdraw for the top 1 percent
> users and helped with overall DrawFrame time as well. Since it did
> not cause any regression or any bug during the finch trial, this
> patch is desired to turn it on by default.
>
> Bug:  672929 
> Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel
> Change-Id: I1952e38347207a9dbdd26e545dadfef00239c48e
> Reviewed-on: https://chromium-review.googlesource.com/969412
> Reviewed-by: danakj <danakj@chromium.org>
> Commit-Queue: Yi Xu <yiyix@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#544500}

Bug:  672929 
Change-Id: I0c33f313920215539f3e7a206521924b6236cfbc
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel
Reviewed-on: https://chromium-review.googlesource.com/982757
Commit-Queue: Yi Xu <yiyix@chromium.org>
Reviewed-by: Yi Xu <yiyix@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546391}
[modify] https://crrev.com/e05ba4c58bde7423528fbb71f61b74543bae919c/components/viz/common/features.cc

Comment 42 by yiyix@chromium.org, Jun 20 2018

Status: Fixed (was: Started)
\o/

Sign in to add a comment