Last Comment Bug 764813 - Avoid using gfxMatrix::SetMatrix in SVG code where possible.
: Avoid using gfxMatrix::SetMatrix in SVG code where possible.
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: SVG (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla16
Assigned To: Jonathan Watt [:jwatt]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-14 07:25 PDT by Jonathan Watt [:jwatt]
Modified: 2012-06-15 05:56 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (7.18 KB, patch)
2012-06-14 07:25 PDT, Jonathan Watt [:jwatt]
no flags Details | Diff | Splinter Review
patch (7.26 KB, patch)
2012-06-14 07:29 PDT, Jonathan Watt [:jwatt]
bas: review+
Details | Diff | Splinter Review

Description Jonathan Watt [:jwatt] 2012-06-14 07:25:35 PDT
Created attachment 633128 [details] [diff] [review]
patch

We should avoid using gfxMatrix::SetMatrix in SVG code where possible.
Comment 1 Jonathan Watt [:jwatt] 2012-06-14 07:29:16 PDT
Created attachment 633129 [details] [diff] [review]
patch
Comment 2 Bas Schouten (:bas.schouten) 2012-06-14 09:51:01 PDT
Comment on attachment 633129 [details] [diff] [review]
patch

Review of attachment 633129 [details] [diff] [review]:
-----------------------------------------------------------------

Should probably change the changeset message to say gfxContext::SetMatrix

::: layout/svg/base/src/nsSVGUtils.cpp
@@ +1404,5 @@
> +  gfxMatrix toRectSpace = aMatrix;
> +  toRectSpace.Invert();
> +  gfxPoint p = toRectSpace.Transform(gfxPoint(aX, aY));
> +  return rect.x <= p.x && p.x <= rect.XMost() &&
> +         rect.y <= p.y && p.y <= rect.YMost();

This is great! :)
Comment 3 Jonathan Watt [:jwatt] 2012-06-14 14:22:51 PDT
> Should probably change the changeset message to say gfxContext::SetMatrix

Done, thanks. :)
Comment 4 Jonathan Watt [:jwatt] 2012-06-14 20:48:16 PDT
Pushed https://hg.mozilla.org/integration/mozilla-inbound/rev/feff8604fde8
Comment 5 Ed Morley [:emorley] 2012-06-15 05:56:50 PDT
https://hg.mozilla.org/mozilla-central/rev/feff8604fde8

Note You need to log in before you can comment on or make changes to this bug.