Closed
Bug 697057
Opened 14 years ago
Closed 14 years ago
Scaled patterns are blurred
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
mozilla10
People
(Reporter: longsonr, Assigned: longsonr)
References
Details
(Keywords: regression)
Attachments
(1 file, 3 obsolete files)
6.44 KB,
patch
|
dholbert
:
review+
|
Details | Diff | Splinter Review |
bug 691646 fixed one way that patterns become blurred but broke another - bug 535185.
In bug 535185 the pattern is small and is scaled when it's used. In bug 691646 the pattern has a patternTransform which scales it. We need to account for both scalings when determining the size of the pattern to create.
Assignee | ||
Updated•14 years ago
|
Assignee | ||
Comment 1•14 years ago
|
||
I'll see if I can do a reftest for this.
Assignee: nobody → longsonr
Assignee | ||
Updated•14 years ago
|
Keywords: regression
Assignee | ||
Comment 2•14 years ago
|
||
Attachment #569330 -
Attachment is obsolete: true
Attachment #569335 -
Flags: review?(dholbert)
Comment 3•14 years ago
|
||
Looks like pattern-scale-01a.svg and pattern-scale-01-ref.svg are missing from the patch.
Comment 4•14 years ago
|
||
oh, sorry -- the ref already exists, and "a" is renamed from an existing file. Cool. Darn bugzilla's diff viewer.
Comment 5•14 years ago
|
||
Comment on attachment 569335 [details] [diff] [review]
patch with reftest
>@@ -254,21 +254,23 @@ nsSVGPatternFrame::PaintPattern(gfxASurf
> // routine.
> *patternMatrix = GetPatternMatrix(bbox, callerBBox, callerCTM);
[...]
>+ float scale = nsSVGUtils::MaxExpansion(callerCTM);
>+
> bool resultOverflows;
> gfxIntSize surfaceSize =
> nsSVGUtils::ConvertToSurfaceSize(
>- gfxSize(patternWidth * fabs(patternMatrix->xx),
>- patternHeight * fabs(patternMatrix->yy)),
>+ gfxSize(patternWidth * fabs(patternMatrix->xx) * scale,
>+ patternHeight * fabs(patternMatrix->yy) * scale),
> &resultOverflows);
Why do we need this extra "scale" factor? Shouldn't we already be getting all the scaling information that we need from |callerCTM| when we create patternMatrix, in the "GetPatternMatrix(..., callerCTM)" call?
See also bug 691646 comment 13... Perhaps that helps with this?
Comment 6•14 years ago
|
||
Actually I'm less sure about bug 691646 comment 13 now, as noted there, so disregard that for now.
However, I'm still a little iffy on the patch here... Note that GetPatternMatrix() already involves a scale by 1/MaxExpansion(callerCTM), so your attached patch here is basically reversing that scale, for the purposes of the surface-size computation. That seems like it could be extra work.
Perhaps we really want to remove that scale from GetPatternMatrix completely? (possibly lifting it up to this method, and applying it to patternMatrix after we've computed the surfaceSize?)
I'm not sure -- I don't totally grok what's going on here. I'd like to get a better idea of why the patch here (or its successor) is correct, before granting r+.
Assignee | ||
Comment 7•14 years ago
|
||
We only want to apply the patternTransform scaling (the scaling in the pattern) without the callerCTM (i.e. the scaling on to the object). You are right in that we're multiplying and dividing in by MaxExpansion order to get the number we'd get from GetPatternTransform directly.
Assignee | ||
Comment 8•14 years ago
|
||
Attachment #569335 -
Attachment is obsolete: true
Attachment #569335 -
Flags: review?(dholbert)
Attachment #569636 -
Flags: review?(dholbert)
Assignee | ||
Comment 9•14 years ago
|
||
Attachment #569636 -
Attachment is obsolete: true
Attachment #569636 -
Flags: review?(dholbert)
Attachment #569638 -
Flags: review?(dholbert)
Comment 10•14 years ago
|
||
Comment on attachment 569638 [details] [diff] [review]
right patch
Could you put a short chunk of documentation over nsSVGPatternFrame::GetPatternMatrix() (either the decl or the impl), to reflect its new usage?
r=me with that.
Attachment #569638 -
Flags: review?(dholbert) → review+
Assignee | ||
Comment 11•14 years ago
|
||
Flags: in-testsuite+
Comment 12•14 years ago
|
||
Do you think this could have caused the following regressions?
Talos Regression :( V8 increase 2.78% on MacOSX 10.6.2 (rev3) Mozilla-Inbound
Talos Regression :( Dromaeo (String/Array/Eval/Regex) decrease 4.17% on MacOSX 10.6.2 (rev3) Mozilla-Inbound
https://groups.google.com/forum/#!topic/mozilla.dev.tree-management/w2WZEx3ugn0
Target Milestone: --- → mozilla10
Comment 13•14 years ago
|
||
(In reply to Ed Morley [:edmorley] from comment #12)
> Do you think this could have caused the following regressions?
No. The patch *only* touched code for the <pattern> element in SVG, so it has no effect on non-SVG content. (I'd be very surprised if either of those test suites included SVG at all, let alone SVG <pattern> elements.)
I'm guessing that the treewatcher bot might have mis-attributed blame here, and the real guilty party might be immediately before/after (or maybe an infra change?)
Comment 14•14 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #13)
> No. The patch *only* touched code for the <pattern> element in SVG
Ah yes. Sorry was in a rush so forgot to actually check the diff :$
Comment 15•14 years ago
|
||
No problem; thanks for your vigilance! This does look like a real regression (with unknown cause so far) -- let's follow up in m.d.tree-management.
Comment 16•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•