New issue
Advanced search Search tips

Issue 819522 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: 2018-03-12
OS: Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

SVG Paths render with an offset when hardware acceleration is activated (probably only when in an iFrame)

Reported by tombi...@wix.com, Mar 7 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36

Example URL:
https://codepen.io/tombigel/full/paMKGN/

Steps to reproduce the problem:
1. Add an SVG to an html file
2. Create a new html with the SVG html embedded as an iFrame
3. Add a hardware accelerated CSS transform on the <svg> element

What is the expected behavior?
The SVG paths should render the same way with and without hardware acceleration

What went wrong?
On MacOS, some or all the paths re-render with a slight visual offset. The paths BBox values does not change. 

If you don't see the described behaviour, try to change the window size, sometimes this does not happen on small windows.

We tested this on multiple Macs with multiple browsers, could only recreate on Chrome.

Attached an animated GIF taken from the Codepen

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? Yes 

Does this work in other browsers? Yes

Chrome version: 64.0.3282.186  Channel: stable
OS Version: OS X 10.13.3
Flash Version: 

The attached Codepen recreates the bug only when in edit/full mode where the SVG is in an iframe. When i opened the Codepen in debug mode (https://s.codepen.io/tombigel/debug/paMKGN) where the SVG is in the top frame, I couldn't recreate
 
svg-bug.gif
8.8 KB View Download

Comment 1 by tkent@chromium.org, Mar 7 2018

Components: -Blink Blink>Paint
Labels: -Type-Bug Needs-Bisect Type-Bug-Regression
Owner: chrishtr@chromium.org
Status: Assigned (was: Unconfirmed)
Is this the issue with OOPIF and SVG that we have fixed?

Comment 3 by f...@opera.com, Mar 7 2018

Doesn't sound (or look) like it would be OOPIF related. I'd suspect some GPU raster issue.
Cc: chrishtr@chromium.org
Labels: -Pri-2 -Needs-Bisect hasbisect-per-revision Target-67 Triaged-ET RegressedIn-64 Target-66 M-67 FoundIn-66 FoundIn-67 Target-65 FoundIn-65 Needs-Triage-M64 Pri-1
Owner: fmalita@chromium.org
Able to reproduce the issue on mac 10.13.3 using chrome reported version #64.0.3282.186, latest stable #65.0.3325.146 and latest canary #67.0.3364.0.

Bisect Information:
=====================
Good build: 63.0.3239.0
Bad Build : 64.0.3240.0

Change Log URL: 
https://chromium.googlesource.com/chromium/src/+log/b902d921a5dbdfb7fde34c5ddfb442fab19f8dfa..1a24eadedcaf0ccdaac8648c812dffad37b9fce5

Skia Change Log URL:
https://skia.googlesource.com/skia.git/+log/e60ca7eae432..f543a60ef06a

From the above change log suspecting below change
Change-Id: I8b872af26150d93cf39cf8eeba23c91e1decace3
Reviewed-on: https://skia-review.googlesource.com/58863

fmalita@ - Could you please check whether this is caused with respect to your change, if not please help us in assigning it to the right owner.

Thanks...!!

Comment 5 by f...@opera.com, Mar 8 2018

Cc: fmalita@chromium.org
Components: Internals>GPU>Rasterization
Owner: jvanverth@chromium.org
https://skia-review.googlesource.com/c/skia/+/57942 (Skia commit 5698c8a8a0dcce3bdabab3551f068bda61d741a3) seems more likely.
Wondering whether  crbug.com/819966  is a duplicate. That's SVG paths as a background image in a sticky container where the path gets sometime rendered at an offset, sometimes not, and not all the paths.
I can't seem to duplicate this even in full-screen mode -- does it only happen with Retina displays? fmalita@ was able to duplicate on his laptop, but not with ToT build.
 crbug.com/819966  might be better place to start, on a higher profile site.

It's not yet reduced though. I can look at doing that this afternoon if my other work goes smoothly.
For those who can reproduce this, this patch (applied to third_party/skia) will probably fix it: https://skia-review.googlesource.com/c/skia/+/113428. If you could verify that would be appreciated.

Project Member

Comment 10 by bugdroid1@chromium.org, Mar 9 2018

The following revision refers to this bug:
  https://skia.googlesource.com/skia/+/a64a5850d946a713a38eeafb68e57a91e00a18cc

commit a64a5850d946a713a38eeafb68e57a91e00a18cc
Author: Jim Van Verth <jvanverth@google.com>
Date: Fri Mar 09 19:50:20 2018

Fix issue with negative translations of small paths

Truncating negative values will produce a negative fractional part when
you subtract out the integer value, which causes havoc with rendering
the path and searching for it in the cache. What we want is the floor.

Bug:  819966 ,  819522 
Change-Id: I2feb451e28bfb863111479f70fd99fa1299abac0
Reviewed-on: https://skia-review.googlesource.com/113428
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>

[modify] https://crrev.com/a64a5850d946a713a38eeafb68e57a91e00a18cc/src/gpu/ops/GrSmallPathRenderer.cpp

NextAction: 2018-03-12
Owner: schenney@chromium.org
I'll verify on Monday. Thanks for the rapid fix.
chromium-issues.csv
234 KB View Download
The NextAction date has arrived: 2018-03-12
Status: Fixed (was: Assigned)
Project Member

Comment 15 by bugdroid1@chromium.org, Mar 15 2018

Labels: merge-merged-m66
The following revision refers to this bug:
  https://skia.googlesource.com/skia/+/46dfb183c8d3ea386e03fb2c4f74d58203dac7dc

commit 46dfb183c8d3ea386e03fb2c4f74d58203dac7dc
Author: Jim Van Verth <jvanverth@google.com>
Date: Thu Mar 15 14:22:27 2018

Fix issue with negative translations of small paths

Truncating negative values will produce a negative fractional part when
you subtract out the integer value, which causes havoc with rendering
the path and searching for it in the cache. What we want is the floor.

No-Tree-Checks: true
No-Try: true
No-Presubmit: true
Bug:  819966 ,  819522 
Change-Id: I2feb451e28bfb863111479f70fd99fa1299abac0
Reviewed-On: https://skia-review.googlesource.com/113428
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-By: Brian Salomon <bsalomon@google.com>
Reviewed-on: https://skia-review.googlesource.com/114496
Reviewed-by: Jim Van Verth <jvanverth@google.com>

[modify] https://crrev.com/46dfb183c8d3ea386e03fb2c4f74d58203dac7dc/src/gpu/ops/GrSmallPathRenderer.h
[modify] https://crrev.com/46dfb183c8d3ea386e03fb2c4f74d58203dac7dc/src/gpu/ops/GrSmallPathRenderer.cpp

 Issue 823614  has been merged into this issue.

Sign in to add a comment