Bug 189748

Summary: Garbled rendering of image when applied feConvolveMatrix to it, on Retina display
Product: WebKit Reporter: nitrino
Component: SVGAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, dino, ews-watchlist, jonlee, kondapallykalyan, sabouhallawa, simon.fraser, webkit-bug-importer, zimmermann
Priority: P2 Keywords: InRadar
Version: Safari 11   
Hardware: All   
OS: All   
URL: https://codepen.io/mark-tyler/pen/VGqbbe
Attachments:
Description Flags
Video showing bug
none
Patch none

Description nitrino 2018-09-19 06:26:17 PDT
Created attachment 350109 [details]
Video showing bug

Here is test case: https://codepen.io/mark-tyler/pen/VGqbbe
Works fine in Chrome, but Safari (iPhone or OSX), renders totally garbled image.
Comment 1 Radar WebKit Bug Importer 2018-09-19 16:24:39 PDT
<rdar://problem/44621494>
Comment 2 Simon Fraser (smfr) 2018-09-19 16:51:21 PDT
Similar to bug 188486.
Comment 3 Simon Fraser (smfr) 2018-09-19 16:53:02 PDT
Only happens on Retina displays.
Comment 4 Simon Fraser (smfr) 2018-09-20 22:03:22 PDT
diff --git a/Source/WebCore/platform/graphics/filters/FEConvolveMatrix.cpp b/Source/WebCore/platform/graphics/filters/FEConvolveMatrix.cpp
index bea66fbf6bea5a35df7e020b7015ba71e9e00536..674b3aaf8a0fac0381578218df675242a841412e 100644
--- a/Source/WebCore/platform/graphics/filters/FEConvolveMatrix.cpp
+++ b/Source/WebCore/platform/graphics/filters/FEConvolveMatrix.cpp
@@ -391,6 +391,8 @@ void FEConvolveMatrix::platformApplySoftware()
         return;
 
     IntSize paintSize = absolutePaintRect().size();
+    paintSize.scale(filter().filterScale());
+    
     PaintingData paintingData = {
         *srcPixelArray,
         *resultImage,
Comment 5 Simon Fraser (smfr) 2018-09-23 11:11:20 PDT
Created attachment 350574 [details]
Patch
Comment 6 WebKit Commit Bot 2018-09-24 11:00:40 PDT
Comment on attachment 350574 [details]
Patch

Clearing flags on attachment: 350574

Committed r236412: <https://trac.webkit.org/changeset/236412>
Comment 7 WebKit Commit Bot 2018-09-24 11:00:41 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 nitrino 2018-09-25 06:44:10 PDT
Thanks! any thoughts on when this may be released in Safari on OSX?
Comment 9 Simon Fraser (smfr) 2018-09-25 10:24:45 PDT
(In reply to nitrino from comment #8)
> Thanks! any thoughts on when this may be released in Safari on OSX?

I can't say, but I can tell you that the fix will be in a Safari Tech Preview build in a couple of weeks or so.