WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
125289
SVG Patterns and Masks in SVG images don't take screen resolution into account
https://bugs.webkit.org/show_bug.cgi?id=125289
Summary
SVG Patterns and Masks in SVG images don't take screen resolution into account
Dirk Schulze
Reported
2013-12-05 01:08:42 PST
It seems like we do not take the real screen pixel density into account when we create image buffers for SVG patterns. In the example image at
http://dev.w3.org/fxtf/css-masking-1/#the-mask-repeat
, the background circles are pixelated on a retina display, while the white/black circle in the foreground isn't.
Attachments
Add attachment
proposed patch, testcase, etc.
Dirk Schulze
Comment 1
2013-12-05 01:11:38 PST
We identified this problem with SVG Filters first, but it affects all situations where we buffer the rendered content: * SVG filters * SVG Masks * SVG clip-path (in some situations) * SVG Patters
Tim Horton
Comment 2
2013-12-05 10:17:21 PST
Hmm, I fixed this for the traditional case, but it must not be plumbed through to SVG-as-image. Possibly because the fake Page that we make for SVGImage doesn't know about the deviceScaleFactor of the parent Page/etc.?
Tim Horton
Comment 3
2013-12-05 10:28:59 PST
(In reply to
comment #2
)
> Hmm, I fixed this for the traditional case, but it must not be plumbed through to SVG-as-image. Possibly because the fake Page that we make for SVGImage doesn't know about the deviceScaleFactor of the parent Page/etc.?
And indeed, you'll notice that if you go directly to
http://dev.w3.org/fxtf/css-masking-1/images/mask-repeat.svg
, it is sharp on a retina display.
Radar WebKit Bug Importer
Comment 4
2014-05-13 00:11:36 PDT
<
rdar://problem/16895584
>
Dirk Schulze
Comment 5
2014-05-13 22:57:20 PDT
(In reply to
comment #3
)
> (In reply to
comment #2
) > > Hmm, I fixed this for the traditional case, but it must not be plumbed through to SVG-as-image. Possibly because the fake Page that we make for SVGImage doesn't know about the deviceScaleFactor of the parent Page/etc.? > > And indeed, you'll notice that if you go directly to
http://dev.w3.org/fxtf/css-masking-1/images/mask-repeat.svg
, it is sharp on a retina display.
I just tried to set the device pixel ratio to the page created with SVGImage (hard coded). The image looks indeed better initially. If you zoom in the page, CMD +, the pattern is slightly blurry again Nst much but if you look closer noticeable. The real problem is that the image seems to get gigantic in memory size as more you zoom in causing the browser to crash at zoom level 200%. Everything tested with the CSS Masking document. So simply setting the devicePixelRatio seems to be wrong.
Tim Horton
Comment 6
2014-05-13 23:08:20 PDT
(In reply to
comment #5
)
> (In reply to
comment #3
) > > (In reply to
comment #2
) > > > Hmm, I fixed this for the traditional case, but it must not be plumbed through to SVG-as-image. Possibly because the fake Page that we make for SVGImage doesn't know about the deviceScaleFactor of the parent Page/etc.? > > > > And indeed, you'll notice that if you go directly to
http://dev.w3.org/fxtf/css-masking-1/images/mask-repeat.svg
, it is sharp on a retina display. > > I just tried to set the device pixel ratio to the page created with SVGImage (hard coded). The image looks indeed better initially. If you zoom in the page, CMD +, the pattern is slightly blurry again Nst much but if you look closer noticeable. > > The real problem is that the image seems to get gigantic in memory size as more you zoom in causing the browser to crash at zoom level 200%. > > Everything tested with the CSS Masking document. So simply setting the devicePixelRatio seems to be wrong.
Setting devicePixelRatio is not enough to fix page scale or page zoom, you have to multiply those in too :D And the other part sounds like we draw more than the visible part of the image?
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