mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bug 691646 - Pattern tile pixelated on patternTransform. r=dholbert
This commit is contained in:
parent
c632b70b2b
commit
80407654c9
13
layout/reftests/svg/pattern-scale-01-ref.svg
Normal file
13
layout/reftests/svg/pattern-scale-01-ref.svg
Normal file
@ -0,0 +1,13 @@
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
<pattern id="pattern" width="200" height="200" patternUnits="userSpaceOnUse">
|
||||
<circle cx="100" cy="100" r="100" fill="lime" />
|
||||
</pattern>
|
||||
</defs>
|
||||
<rect width="200" height="200" fill="url(#pattern)" />
|
||||
<circle cx="100" cy="100" r="100" fill="none" stroke="lime" stroke-width="2" shape-rendering="crispEdges" />
|
||||
</svg>
|
After Width: | Height: | Size: 505 B |
13
layout/reftests/svg/pattern-scale-01.svg
Normal file
13
layout/reftests/svg/pattern-scale-01.svg
Normal file
@ -0,0 +1,13 @@
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
<pattern id="pattern" width="5" height="5" patternUnits="userSpaceOnUse" patternTransform="scale(-40)">
|
||||
<circle cx="2.5" cy="2.5" r="2.5" fill="lime" />
|
||||
</pattern>
|
||||
</defs>
|
||||
<rect width="200" height="200" fill="url(#pattern)" />
|
||||
<circle cx="100" cy="100" r="100" fill="none" stroke="lime" stroke-width="2" shape-rendering="crispEdges" />
|
||||
</svg>
|
After Width: | Height: | Size: 531 B |
@ -176,6 +176,7 @@ fails-if(Android&&layersOpenGL) == path-04.svg pass.svg
|
||||
== pattern-live-01a.svg pattern-live-01-ref.svg
|
||||
== pattern-live-01b.svg pattern-live-01-ref.svg
|
||||
== pattern-live-01c.svg pattern-live-01-ref.svg
|
||||
== pattern-scale-01.svg pattern-scale-01-ref.svg
|
||||
== pattern-transform-presence-01.svg pattern-transform-presence-01-ref.svg
|
||||
== polygon-marker-01.svg pass.svg
|
||||
== polygon-points-negative-01.svg pass.svg
|
||||
|
@ -261,8 +261,10 @@ nsSVGPatternFrame::PaintPattern(gfxASurface** surface,
|
||||
|
||||
bool resultOverflows;
|
||||
gfxIntSize surfaceSize =
|
||||
nsSVGUtils::ConvertToSurfaceSize(gfxSize(patternWidth, patternHeight),
|
||||
&resultOverflows);
|
||||
nsSVGUtils::ConvertToSurfaceSize(
|
||||
gfxSize(patternWidth * fabs(patternMatrix->xx),
|
||||
patternHeight * fabs(patternMatrix->yy)),
|
||||
&resultOverflows);
|
||||
|
||||
// 0 disables rendering, < 0 is an error
|
||||
if (surfaceSize.width <= 0 || surfaceSize.height <= 0)
|
||||
|
Loading…
Reference in New Issue
Block a user