Give GetCanvasTM knowledge of what the request is for so it can do the right thing when SVG display lists are enabled

RESOLVED FIXED in mozilla16

Status

()

defect
RESOLVED FIXED
7 years ago
5 years ago

People

(Reporter: jwatt, Assigned: jwatt)

Tracking

Trunk
mozilla16
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

For bug 641732 I need GetCanvasTM to do different things based on whether the call is for painting or hit-testing when the SVG display list painting/hit-testing prefs are enabled, or not, or for a displayed frame, or not.

Basically, for displayed elements being painted or hit-tested through display lists, we need GetCanvasTM to return a simple css-px-to-dev-pixel transform, since the display lists account for any transforms on them or their ancestors. For non-display elements - which are not painted/hit-tested through display lists - we need GetCanvasTM to return the transform as normal. For other calls to GetCanvasTM that are not for painting/hit-testing, we also need GetCanvasTM to return the transform as normal.
This is a preliminary patch to change nsSVGPathGeometryFrame::GeneratePath to require all its callers to pass in the ctm they want to use. 3 of the 5 already did. This puts the GetCanvasTM call points at places where we know whether we're being called for painting or hit-testing, making the real, upcoming patch for this bug cleaner.
Attachment #636157 - Flags: review?(longsonr)
Depends on: 767823
Summary: Give GetCanvasTM knowledge of what the request is for and have it use that to act on the SVG display list prefs → Give GetCanvasTM knowledge of what the request is for so it can do the right thing when SVG display lists are enabled
Attachment #636157 - Flags: review?(longsonr) → review+
Attachment #636157 - Flags: checkin+
Posted patch patchSplinter Review
Attachment #638072 - Flags: review?(longsonr)
Comment on attachment 638072 [details] [diff] [review]
patch

It seems a shame that 

> +  if (!(GetStateBits() & NS_STATE_SVG_NONDISPLAY_CHILD)) {
> +    if ((aFor == FOR_PAINTING && NS_SVGDisplayListPaintingEnabled()) ||
> +        (aFor == FOR_HIT_TESTING && NS_SVGDisplayListHitTestingEnabled())) {
> +      return nsSVGIntegrationUtils::GetCSSPxToDevPxMatrix(this);
> +    }
> +  }

It's a shame this occurs so many time. I don't really have any good ideas for fixing it though.

r=longsonr
Attachment #638072 - Flags: review?(longsonr) → review+
Pushed https://hg.mozilla.org/integration/mozilla-inbound/rev/82a0b3fe9fa7
Target Milestone: --- → mozilla16
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Whiteboard: [leave open]
Blocks: 614732
Depends on: 1126940
You need to log in before you can comment on or make changes to this bug.