WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
99874
[Chromium] SVG repaint issues
https://bugs.webkit.org/show_bug.cgi?id=99874
Summary
[Chromium] SVG repaint issues
Florin Malita
Reported
2012-10-19 14:32:29 PDT
Created
attachment 169697
[details]
Leaves unpainted artifacts when shrinking When scaling (shrinking) SVG shapes dynamically, the old area is not always fully repainted.
Attachments
Leaves unpainted artifacts when shrinking
(4.79 KB, text/html)
2012-10-19 14:32 PDT
,
Florin Malita
no flags
Details
Updated test.
(865 bytes, text/html)
2012-10-22 08:00 PDT
,
Florin Malita
no flags
Details
Screenshot of observed ghosting.
(2.87 KB, image/png)
2012-10-22 08:20 PDT
,
Florin Malita
no flags
Details
Patch
(105.68 KB, patch)
2012-10-24 10:23 PDT
,
Florin Malita
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Florin Malita
Comment 1
2012-10-22 07:00:16 PDT
Not limited to scaling, see
http://code.google.com/p/chromium/issues/detail?id=156597
Florin Malita
Comment 2
2012-10-22 08:00:47 PDT
Created
attachment 169909
[details]
Updated test. The initial test only exhibits the issue for certain browser window sizes. Updated.
Florin Malita
Comment 3
2012-10-22 08:08:56 PDT
Also, this appears to be Chromium-only.
Florin Malita
Comment 4
2012-10-22 08:20:34 PDT
Created
attachment 169917
[details]
Screenshot of observed ghosting.
Florin Malita
Comment 5
2012-10-24 07:33:16 PDT
I tracked this down to accumulated rounding errors in SVGRenderRoot::paintReplaced() when using subpixel layout: IntPoint adjustedPaintOffset = roundedIntPoint(paintOffset); childPaintInfo.applyTransform(AffineTransform::translation(adjustedPaintOffset.x() - x(), adjustedPaintOffset.y() - y()) * localToParentTransform()); The problem is we're rounding layout units both for adjustedPaintOffset and in localToParentTransform() and effectively adding the results => we're getting 2x the rounding delta. If the delta happens to be 1/2 pixles then we end up being off by one pixel, which skews the painting/repainting rects. We can either adjust by one in the special case of rounding delta == 0.5, or use localToBorderBoxTransform() to avoid getting the delta injected twice. I'll put a patch up shortly.
Florin Malita
Comment 6
2012-10-24 10:23:03 PDT
Created
attachment 170422
[details]
Patch
Florin Malita
Comment 7
2012-10-24 10:25:20 PDT
Not sure whether subpixel layout is used on other platforms besides Chromium - if it is we'll have to add new expectations to the patch.
Levi Weintraub
Comment 8
2012-10-24 10:28:11 PDT
Comment on
attachment 170422
[details]
Patch LGTM. Thank you.
Levi Weintraub
Comment 9
2012-10-24 10:28:40 PDT
(In reply to
comment #7
)
> Not sure whether subpixel layout is used on other platforms besides Chromium - if it is we'll have to add new expectations to the patch.
Not yet, no.
WebKit Review Bot
Comment 10
2012-10-24 11:14:12 PDT
Comment on
attachment 170422
[details]
Patch Clearing flags on attachment: 170422 Committed
r132377
: <
http://trac.webkit.org/changeset/132377
>
WebKit Review Bot
Comment 11
2012-10-24 11:14:16 PDT
All reviewed patches have been landed. Closing bug.
Florin Malita
Comment 12
2012-10-25 06:05:38 PDT
Committed
r132477
: <
http://trac.webkit.org/changeset/132477
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug