viz: Set RPDQ blend to kSrcOver for empty backdrop rects

When the backdrop rect for a render pass is empty, gl_renderer currently
sets use_shaders_for_blending to false, disregarding if the render
pass blend mode is supported by the underlying graphics API.
If it's not supported, a DCHECK is later hit when setting up alpha

This patch sets the blend function to kSrcOver in those cases where the
backdrop rect is empty.
The backdrop rect should be empty only in cases where the render pass
draw quad is completely clipped.
In the test case found by cluster fuzz the element has a
clip-path: polygon(3px 0px, 35px 1px) that limits the render pass
output rect. When computing the backdrop rect we intersect it with
the render pass output rect resulting in an empty rect.

Bug: 946464
Change-Id: Ie8a487a4f85c3a69ab4f809fc1ade1a71bdaaeda
Reviewed-by: Antoine Labour <>
Commit-Queue: Daniele Castagna <>
Cr-Commit-Position: refs/heads/master@{#653371}
1 file changed