Closed Bug 767734 Opened 12 years ago Closed 12 years ago

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

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla16

People

(Reporter: jwatt, Assigned: jwatt)

References

Details

Attachments

(2 files)

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+
Attached 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: 12 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.

Attachment

General

Created:
Updated:
Size: