Closed
Bug 1040906
Opened 11 years ago
Closed 11 years ago
To3DMatrix and ToMatrix4x4 should have return values instead of out-parameters
Categories
(Core :: Graphics: Layers, defect)
Tracking
()
RESOLVED
FIXED
mozilla34
People
(Reporter: kats, Assigned: kats)
Details
Attachments
(1 file)
36.53 KB,
patch
|
bas.schouten
:
review+
|
Details | Diff | Splinter Review |
The matrix conversion routines take out-parameters which I find extremely annoying because it requires creating a local variable at the call site when sometimes you wouldn't need one otherwise (e.g. if you're just passing the converted result to a function right away).
Instead of doing this:
gfx3DMatrix tmp;
To3DMatrix(aLayer->GetTransform(), tmp);
myRegion.Transform(tmp);
you should just be able to do this:
myRegion.Transform(To3DMatrix(aLayer->GetTransform()));
Assignee | ||
Comment 1•11 years ago
|
||
Bas, since you added the code, do you have any objections to this change? It should all get inlined anyway so I don't think there would be any perf impact. If you have no objections I'm happy to be a mentor for it (or implement it if it annoys me sufficiently).
Flags: needinfo?(bas)
Assignee | ||
Comment 2•11 years ago
|
||
It annoyed me sufficiently.
Comment 3•11 years ago
|
||
Comment on attachment 8458985 [details] [diff] [review]
Patch
Review of attachment 8458985 [details] [diff] [review]:
-----------------------------------------------------------------
I don't think I actually wrote this code! :) But looks good to me!
Attachment #8458985 -
Flags: review?(bas) → review+
Assignee | ||
Comment 4•11 years ago
|
||
That's what the blame said. Ah well.
https://hg.mozilla.org/integration/mozilla-inbound/rev/e6a2c46ad0b5
Assignee | ||
Comment 5•11 years ago
|
||
Follow-up because I missed a call site in gonk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/bd44af6a0e8d
Comment 6•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/e6a2c46ad0b5
https://hg.mozilla.org/mozilla-central/rev/bd44af6a0e8d
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in
before you can comment on or make changes to this bug.
Description
•