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 blending. 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 Test: https://clusterfuzz.com/testcase?key=5140838366707712 Change-Id: Ie8a487a4f85c3a69ab4f809fc1ade1a71bdaaeda Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1576233Reviewed-by:Antoine Labour <piman@chromium.org> Commit-Queue: Daniele Castagna <dcastagna@chromium.org> Cr-Commit-Position: refs/heads/master@{#653371}
Showing
Please register or sign in to comment