Closed Bug 930468 Opened 7 years ago Closed 7 years ago
Add a Moz2D version of SVGPath
No description provided.
Bas, can you review the use of the Moz2D API in this patch?
Attachment #821668 - Flags: review?
Attachment #821668 - Flags: review? → review?(bas)
Comment on attachment 821668 [details] [diff] [review] patch Cameron, can you look at the SVG changes?
Attachment #821668 - Flags: review?(cam)
Comment on attachment 821668 [details] [diff] [review] patch Review of attachment 821668 [details] [diff] [review]: ----------------------------------------------------------------- ::: content/svg/content/src/SVGPathData.cpp @@ +6,5 @@ > #include "SVGPathData.h" > > #include "gfx2DGlue.h" > #include "gfxPlatform.h" > +#include "mozilla/gfx/2D.h" nit: None of this is needed since we now include 2D.h in the header. @@ +255,5 @@ > + // coordinates, we double this for |tinyAdvance|: > + > + Matrix currentTransform = aDT->GetTransform(); > + currentTransform.Invert(); > + Size tinyAdvance = currentTransform * Size(2.0/256.0, 0.0); nit: spaces around the / operator and let's use point. ::: content/svg/content/src/SVGPathData.h @@ +11,5 @@ > #include "nsIContent.h" > #include "nsINode.h" > #include "nsIWeakReferenceUtils.h" > +#include "mozilla/gfx/2D.h" > +#include "mozilla/RefPtr.h" nit: You don't need this if you're including 2D.h
Attachment #821668 - Flags: review?(bas) → review+
Attachment #821668 - Flags: review?(cam) → review+
I can't land this patch in its entirety just yet since we need Moz2D path measuring to work, and that isn't working on Mac jut yet. Bug 926258 will fix that. We end up doing measuring from the path when, for example, we end up under this stack: mozilla::gfx::Path::ComputeLength gfxPath::GetLength mozilla::dom::SVGPathElement::GetPathLengthScale GetStrokeDashData nsSVGUtils::SetupCairoStrokeGeometry nsSVGUtils::SetupCairoStroke nsSVGPathGeometryFrame::Render nsSVGPathGeometryFrame::PaintSVG
I span out the enabling part of the patch into bug 930577 and landed the rest: https://hg.mozilla.org/integration/mozilla-inbound/rev/075fc0110d9f
Summary: Stop SVGPathData::ToPath from expecting a device space path from Moz2D by adding and using a Moz2D version of SVGPathData::ConstructPath → Add a Moz2D version of SVGPathData::ConstructPath
Push backed out for crashes on WinXP: https://tbpl.mozilla.org/?tree=Mozilla-Inbound&jobname=XP%20&rev=075fc0110d9f remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/1203ba8ffc0d remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/561bb4c94909 remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/e3c9d95e5bc0
The WinXP crashes were caused by bug 930516. Relanded: https://hg.mozilla.org/integration/mozilla-inbound/rev/2b98c52e5e08
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in before you can comment on or make changes to this bug.