Bug 189748 - Garbled rendering of image when applied feConvolveMatrix to it, on Retina display
Summary: Garbled rendering of image when applied feConvolveMatrix to it, on Retina dis...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: Safari 11
Hardware: All All
: P2 Normal
Assignee: Simon Fraser (smfr)
URL: https://codepen.io/mark-tyler/pen/VGqbbe
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-09-19 06:26 PDT by nitrino
Modified: 2018-09-25 10:24 PDT (History)
9 users (show)

See Also:


Attachments
Video showing bug (1.32 MB, video/mp4)
2018-09-19 06:26 PDT, nitrino
no flags Details
Patch (3.83 KB, patch)
2018-09-23 11:11 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.