-
Notifications
You must be signed in to change notification settings - Fork 31.1k
[web]:Canvaskit ClipRect not being clipped properly #58547
Copy link
Copy link
Closed
Labels
assigned for triageissue is assigned to a domain expert for further triageissue is assigned to a domain expert for further triagec: renderingUI glitches reported at the engine/skia or impeller rendering levelUI glitches reported at the engine/skia or impeller rendering leveldependency: skiaSkia team may need to help usSkia team may need to help use: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for WebCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Webe: web_htmlHTML rendering backend for WebHTML rendering backend for Webplatform-androidAndroid applications specificallyAndroid applications specificallyplatform-iosiOS applications specificallyiOS applications specificallyplatform-linuxBuilding on or for Linux specificallyBuilding on or for Linux specificallyplatform-macosBuilding on or for macOS specificallyBuilding on or for macOS specificallyplatform-webWeb applications specificallyWeb applications specificallyplatform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specifically
Description
Activity
Metadata
Metadata
Assignees
Labels
assigned for triageissue is assigned to a domain expert for further triageissue is assigned to a domain expert for further triagec: renderingUI glitches reported at the engine/skia or impeller rendering levelUI glitches reported at the engine/skia or impeller rendering leveldependency: skiaSkia team may need to help usSkia team may need to help use: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for WebCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Webe: web_htmlHTML rendering backend for WebHTML rendering backend for Webplatform-androidAndroid applications specificallyAndroid applications specificallyplatform-iosiOS applications specificallyiOS applications specificallyplatform-linuxBuilding on or for Linux specificallyBuilding on or for Linux specificallyplatform-macosBuilding on or for macOS specificallyBuilding on or for macOS specificallyplatform-webWeb applications specificallyWeb applications specificallyplatform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specifically
The Maskfilter.blur(BlurStyle.outer, 10) is doing its thing in a ClipRect with a default hard edge (I tried other edges too). Sometimes at some scales and resolutions on devices/desktop/canvasKit the outer blur that the ClipRect should cut off is bleeding out, causing a hairline artefact red line to appear that should not be there. I don’t know exactly why, but I suspect some kind of rounding issue of the clipping algorithm.
This is what it looks like at a screen/device scale situation when it appears:

That hairline should never be visible if the ClipRect would correctly do what it is supposed to do. Alternatively it is the MaskFilter.blur(BlurStyle.outer, 10) that starts its outer blurring at some resolutions at the inner side already, preventing the ClipRect from cutting it away. Regardless of what is causing it, it should not happen and mostly it does not, but at some resolutions it does.
issue from @rydmike