Commit ea2398bb authored by Daniele Castagna's avatar Daniele Castagna Committed by Commit Bot

viz: Remove loop in RemoveOverdrawQuads

Originally RemoveOverdrawQuads looped trough all the renderpasses
and did some computation for the non-root ones, and then executed
occlusion logic on the root one.

A CL that removed the computation for non-root renderpasses landed,
making the loop always skip his body for all the renderpasses
but the root one.

This CL removes the loop and executes the occlusion logic only for
the root renderpass.

Test: RemoveOverdrawQuadPerfTest.*

Change-Id: Ie92deae2b5fb65e1f5be605f79bc47bfc9de36bc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2033368Reviewed-by: default avatarSasha McIntosh <sashamcintosh@chromium.org>
Commit-Queue: Daniele Castagna <dcastagna@chromium.org>
Cr-Commit-Position: refs/heads/master@{#738425}
parent ac8bdabb
......@@ -852,19 +852,10 @@ void Display::RemoveOverdrawQuads(CompositorFrame* frame) {
int minimum_draw_occlusion_width =
settings_.kMinimumDrawOcclusionSize.width() * device_scale_factor_;
for (const auto& pass : frame->render_pass_list) {
// TODO(yiyix): Add filter effects to draw occlusion calculation and perform
// draw occlusion on render pass.
if (!pass->filters.IsEmpty() || !pass->backdrop_filters.IsEmpty()) {
continue;
}
// TODO(yiyix): Perform draw occlusion inside the render pass with
// transparent background.
if (pass != frame->render_pass_list.back()) {
continue;
}
const auto& pass = frame->render_pass_list.back();
// TODO(yiyix): Add filter effects to draw occlusion calculation and perform
// draw occlusion on render pass.
if (pass->filters.IsEmpty() && pass->backdrop_filters.IsEmpty()) {
auto quad_list_end = pass->quad_list.end();
gfx::Rect occlusion_in_quad_content_space;
for (auto quad = pass->quad_list.begin(); quad != quad_list_end;) {
......
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