Open Bug 2009392 Opened 1 day ago Updated 1 day ago

The size of a quad render task doesn't always match the size of the quad

Categories

(Core :: Graphics: WebRender, defect)

defect

Tracking

()

People

(Reporter: nical, Assigned: nical)

Details

Attachments

(1 file)

some WPT tests like /css/css-images/gradient/css-color-4-colors-default-to-oklab-gradient.html or /css/css-images/gradient/gradient-decreasing-hue-lch.html are borken with quad gradients if the gradients are cached.

This is caused by the intermediate render tasks using Surface::get_surface_rect to compute the size of the render task (it projects to device space then rounds out), then render a quad primitive (in layout space) in the render task but doing the projection in the shader and letting the rasterizer decide what pixels are touched by the primitive. The behavior is closer to rounding (but not rounding out). As a result the render task's primitive sometimes does not entirely covers the render tasks, leaving 1px gaps on the side with uninitialized texture memory.

Assignee: nobody → nical.bugzilla
Severity: -- → S2

Intermediate quad render tasks use Surface::get_surface_rect to compute the size of the render task (it projects to device space then rounds out), then render a quad primitive (in layout space) in the render task but does the projection in the shader and lets the rasterizer decide what pixels are touched by the primitive. The behavior is closer to rounding (but not rounding out). As a result the render task's primitive sometimes does not entirely covers the render task rect, leaving 1px gaps on the side with uninitialized texture memory which is then sampled by the composite quad.

This patch mainly inlines Surface::get_surface_rect into prepare_quad_impl but using round instead of round-out.
It fixes cached quad gradient regressions that were caught by some web platform tests.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: