Closed
Bug 1249936
Opened 10 years ago
Closed 10 years ago
Add a LayerComposite::GetShadowTransform() method which returns the shadow base transform multiplied by the scales
Categories
(Core :: Graphics: Layers, defect)
Core
Graphics: Layers
Tracking
()
RESOLVED
FIXED
mozilla49
| Tracking | Status | |
|---|---|---|
| firefox49 | --- | fixed |
People
(Reporter: botond, Assigned: ronoueb, Mentored)
References
Details
(Whiteboard: [lang=c++] [gfx-noted])
Attachments
(2 files, 3 obsolete files)
|
5.82 KB,
patch
|
botond
:
review+
|
Details | Diff | Splinter Review |
|
4.85 KB,
patch
|
botond
:
review+
|
Details | Diff | Splinter Review |
Now that bug 1247450 has renamed LayerComposite::GetShadowTransform() to GetShadowBaseTransform() to indicate that it does not include the pre- and post-scales, we can add a method LayerComposite::GetShadowTransform() which returns the transform that does include the pre- and post-scales.
The implementation of this method would look very similar to the implementation of Layer::GetTransform(), except instead of using Layer::mTransform as the starting point, it would use LayerComposite::mShadowTransform.
Having done this, we can also simplify the implementation of Layer::GetLocalTransform() - we can have it return either LayerComposite::GetShadowTransform(), or Layer::GetTransform(), depending on whether the layer is a LayerComposite, and not multiply by the scales itself.
Comment 1•10 years ago
|
||
I will take on this bug.
| Reporter | ||
Comment 2•10 years ago
|
||
Thanks! I assigned the bug to you.
Let me know if you have any questions!
Assignee: nobody → matthewstroud101
Comment 3•10 years ago
|
||
One question would be a good IDE? One that is capable of running decently on a Virtual Machine?
| Reporter | ||
Comment 4•10 years ago
|
||
(In reply to matthewstroud101 from comment #3)
> One question would be a good IDE? One that is capable of running decently on
> a Virtual Machine?
I'd say it's mostly a matter of taste. I use Eclipse CDT, and I find it works well, including on a virtual machine (although it's a bit of a memory hog, so it depends how much memory the virtual machine has). I know others who use Visual Studio or Xcode, or editors that aren't IDEs like Sublime Text or vim.
If you'd like to try Eclipse, our build system has a command that generates an Eclipse project suitable for editing mozilla-central code:
./mach build-backend -b CppEclipse
(There is a similar command for creating a Visual Studio project, too.)
| Reporter | ||
Comment 5•10 years ago
|
||
Matthew, are you still working on this? If you're stuck on anything, I'm happy to help!
Flags: needinfo?(matthewstroud101)
Comment 6•10 years ago
|
||
I became pretty busy with school since I asked to work on this bug. Right now, I feel like I do not have the time to work on it until I graduate in June. I am still interested in working on bug patches for Mozilla, but for now, if somebody else wants to work on this, then they should be able to.
| Reporter | ||
Comment 7•10 years ago
|
||
That's no problem. I'll un-assign the bug from you, so others know it's available to be worked on.
Assignee: matthewstroud101 → nobody
Flags: needinfo?(matthewstroud101)
Updated•10 years ago
|
Whiteboard: [lang=c++] → [lang=c++] [gfx-noted]
Sorry about the "whitespace noise", I guess my editor did that when I saved.
Attachment #8747428 -
Flags: feedback?(botond)
Attachment #8747429 -
Flags: feedback?(botond)
| Reporter | ||
Updated•10 years ago
|
Assignee: nobody → bd339
| Reporter | ||
Comment 10•10 years ago
|
||
Comment on attachment 8747428 [details] [diff] [review]
add a GetShadowTransform method
Review of attachment 8747428 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks, this looks good!
(Normally, I'd ask for the 'const' to be removed from the return type, because I don't see any point in that when returning by value, but I see Layer::GetTransform() has it as well, so let's just remain consistent with that.)
The only other thing required to land the patch is a commit message, of the form "Bug <bugnumber> - <description>. r=<reviewer>". Could you upload a new version of the patch that includes that? The reviewer would be me ("botond"). Thanks!
Attachment #8747428 -
Flags: feedback?(botond) → feedback+
| Reporter | ||
Comment 11•10 years ago
|
||
Comment on attachment 8747429 [details] [diff] [review]
simplify GetLocalTransform
Review of attachment 8747429 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good, thanks!
As with the other patch, please add a commit message.
Attachment #8747429 -
Flags: feedback?(botond) → feedback+
| Assignee | ||
Comment 12•10 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #10)
> Comment on attachment 8747428 [details] [diff] [review]
> add a GetShadowTransform method
>
> Review of attachment 8747428 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> (Normally, I'd ask for the 'const' to be removed from the return type,
> because I don't see any point in that when returning by value, but I see
> Layer::GetTransform() has it as well, so let's just remain consistent with
> that.)
>
I was confused about the decision to make Layer::GetTransform return a const value as well. The only thing I could think of, is if for some reason you want to prevent the codebase doing something like GetTransform().SomeNonConstFunction(); but even so that is rather pointless as one can just store the return value in a non-const value and then due a non-const operation on it. Of course it makes perfect sense if we were returning by reference like GetShadowBaseTransform.
| Assignee | ||
Comment 13•10 years ago
|
||
Attachment #8747428 -
Attachment is obsolete: true
Attachment #8747429 -
Attachment is obsolete: true
Attachment #8747506 -
Flags: review?(botond)
| Assignee | ||
Comment 14•10 years ago
|
||
No code changes, just messed up last time in generating the patch in the format expected.
Attachment #8747506 -
Attachment is obsolete: true
Attachment #8747506 -
Flags: review?(botond)
| Assignee | ||
Comment 15•10 years ago
|
||
Forgot to request review from you in BugZilla.
Flags: needinfo?(botond)
| Reporter | ||
Comment 16•10 years ago
|
||
Comment on attachment 8747510 [details] [diff] [review]
add a GetShadowTransform method & simplify GetLocalTransform, 2nd revision
Review of attachment 8747510 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks!
Attachment #8747510 -
Flags: review+
| Reporter | ||
Comment 17•10 years ago
|
||
Here's a build-only Try push with the patch applied, to make sure it builds on all platforms:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=337e6e49b5ac
Flags: needinfo?(botond)
| Reporter | ||
Comment 18•10 years ago
|
||
(In reply to bd339 from comment #12)
> (In reply to Botond Ballo [:botond] from comment #10)
> > (Normally, I'd ask for the 'const' to be removed from the return type,
> > because I don't see any point in that when returning by value, but I see
> > Layer::GetTransform() has it as well, so let's just remain consistent with
> > that.)
>
> I was confused about the decision to make Layer::GetTransform return a const
> value as well. The only thing I could think of, is if for some reason you
> want to prevent the codebase doing something like
> GetTransform().SomeNonConstFunction(); but even so that is rather pointless
> as one can just store the return value in a non-const value and then due a
> non-const operation on it. Of course it makes perfect sense if we were
> returning by reference like GetShadowBaseTransform.
If you'd like to write a follow-up patch to remove the const from the return types of each of Layer::GetTransform(), Layer::GetLocalTransform(), and LayerComposite::GetShadowTransform(), I would review that.
Comment 19•10 years ago
|
||
Comment 20•10 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
| Assignee | ||
Comment 21•10 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #18)
> If you'd like to write a follow-up patch to remove the const from the return
> types of each of Layer::GetTransform(), Layer::GetLocalTransform(), and
> LayerComposite::GetShadowTransform(), I would review that.
Yes, I would like to do that.
| Assignee | ||
Comment 22•10 years ago
|
||
Should such a follow-up patch be submitted against a new bug or this one?
Flags: needinfo?(botond)
| Reporter | ||
Comment 23•10 years ago
|
||
(In reply to bd339 from comment #22)
> Should such a follow-up patch be submitted against a new bug or this one?
Might as well do it in this bug.
Flags: needinfo?(botond)
| Assignee | ||
Comment 24•10 years ago
|
||
Attachment #8748171 -
Flags: feedback?(botond)
| Reporter | ||
Comment 25•10 years ago
|
||
Comment on attachment 8748171 [details] [diff] [review]
remove unnecessary const from functions
Review of attachment 8748171 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks!
Attachment #8748171 -
Flags: feedback?(botond) → review+
| Reporter | ||
Comment 26•10 years ago
|
||
Try push for second patch: https://treeherder.mozilla.org/#/jobs?repo=try&revision=221f3296e3ac
Comment 27•10 years ago
|
||
| Reporter | ||
Comment 28•10 years ago
|
||
(In reply to Pulsebot from comment #27)
> https://hg.mozilla.org/integration/mozilla-inbound/rev/814ea77366d2
^ Landed the second patch.
bd339, thanks for your contributions in this bug! If you're interesting in working on more bugs, and would like some suggestions, let me know.
| Assignee | ||
Comment 29•10 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #28)
> bd339, thanks for your contributions in this bug! If you're interesting in
> working on more bugs, and would like some suggestions, let me know.
I am very much interested.
| Reporter | ||
Comment 30•10 years ago
|
||
(In reply to bd339 from comment #29)
> (In reply to Botond Ballo [:botond] from comment #28)
> > bd339, thanks for your contributions in this bug! If you're interesting in
> > working on more bugs, and would like some suggestions, let me know.
>
> I am very much interested.
From among the bugs I'm mentoring, bug 1170062 might be a good one for you.
Of course, there are also bugs others are mentoring, I'm just not familiar enough with them to recommend specific ones; http://www.joshmatthews.net/bugsahoy/ is a good tool for picking one.
Comment 31•10 years ago
|
||
| bugherder | ||
You need to log in
before you can comment on or make changes to this bug.
Description
•