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)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: kats, Assigned: kats)

Details

Attachments

(1 file)

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()));
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)
Attached patch PatchSplinter Review
It annoyed me sufficiently.
Assignee: nobody → bugmail.mozilla
Attachment #8458985 - Flags: review?(bas)
Flags: needinfo?(bas)
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+
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.

Attachment

General

Created:
Updated:
Size: