Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 74a41b5f4ec4b216ca4ddac4ffa0ba325374924f
      
https://github.com/WebKit/WebKit/commit/74a41b5f4ec4b216ca4ddac4ffa0ba325374924f
  Author: Simon Pena <[email protected]>
  Date:   2026-05-07 (Thu, 07 May 2026)

  Changed paths:
    M 
LayoutTests/compositing/clipping/border-radius-async-overflow-stacking.html
    M LayoutTests/svg/compositing/svg-poster-circle.html
    M Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp

  Log Message:
  -----------
  [TextureMapper] Round-clip shader needs highp on PowerVR B-Series
https://bugs.webkit.org/show_bug.cgi?id=314201

Reviewed by Miguel Gomez.

The GLSL helpers used by applyRoundedRectClip (ellipsisDist,
ellipsisCoverage, roundedRectCoverage) compute corner coverage as
(dot(p0,p0) - 1.0) / length(p1). On some proprietary GLES drivers this
form is miscomputed under mediump (fp16). Reproduced on PowerVR
B-Series (Imagination DDK 24.1@6554834): ellipsisCoverage returns 0
for fragments well inside the inscribed ellipse, so descendants under
a 'border-radius + overflow:hidden' ancestor render as solid
coverage=0 (silent black) instead of being correctly clipped.

The fix here is to promote precision on the round-clip path only:

* v_nonProjectedPosition varying (vertex + fragment templates)
* u_roundedRect, u_roundedRectInverseTransformMatrix uniforms
* parameters and locals in ellipsisDist, ellipsisCoverage,
roundedRectCoverage
* locals in applyRoundedRectClip (fragCoord, bounds, *Radii)

This keeps mediump for the rest of the fragment shader (filters,
blur, tone-map) so the cost is confined to the round-clip path.

Tested on device, glitch is gone. The same issue can be reproduced using
WebGL, so a separate bug to Imagination might need to be raised.
Updated layout tests to add a bit more leeway due to the changes in the
shader (no visual difference at plain sight).

* LayoutTests/compositing/clipping/border-radius-async-overflow-stacking.html:
* LayoutTests/svg/compositing/svg-poster-circle.html:
* Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp:

Canonical link: https://commits.webkit.org/312802@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to