Closed Bug 1570111 Opened 7 years ago Closed 4 years ago

Respect ClearMode::DontCare for color targets in WebRender

Categories

(Core :: Graphics: WebRender, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED

People

(Reporter: kvark, Unassigned)

Details

We are currently only using ClearMode::Transparent for the color render tasks. The whole color layer is cleared based on the combined used_rect (and whether or not scissors are supported).

What we could do instead is to keep a list of clear rectangles, like we do for the alpha targets. When a render task is allocated in a texture layer, we'd only add a clear rect for it if the mode is not ClearMode::DontCare.

There are render tasks that are guaranteed to fill the target area, which means we can avoid clearing it beforehand. At the same time, clear times are significantly contributing to our GPU timing, according to the GPU profile bars we have, so having a different way to approach this could have a large impact on the overall GPU time.

Note: on Android we may want to just clear the layers awhole instead of dealing with rects, for both color and alpha, even if we are following up with rendering some 1-filling (or 0-filling) clear rectangles. This is because tiling GPUs have a much easier time loading a constant clear value for each pixel at the start of a render pass than loading an actual pixel value from the texture.

Priority: -- → P3

We support this now.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.