Closed
Bug 1465118
Opened 7 years ago
Closed 7 years ago
Some small nsDisplayTransform improvements
Categories
(Core :: Web Painting, enhancement)
Core
Web Painting
Tracking
()
RESOLVED
FIXED
mozilla62
Tracking | Status | |
---|---|---|
firefox62 | --- | fixed |
People
(Reporter: mikokm, Assigned: mikokm)
Details
Attachments
(4 files)
Bug 1465118 - Part 1: Disable broken nsDisplayTransform::IsUniform() logic to avoid unnecessary work
59 bytes,
text/x-review-board-request
|
mattwoodrow
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
mattwoodrow
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
mattwoodrow
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
mattwoodrow
:
review+
|
Details |
These patches disable/remove dead code, and cache the inverted transform matrix, since retained DL allows us to do that.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 8•7 years ago
|
||
mozreview-review |
Comment on attachment 8981496 [details]
Bug 1465118 - Part 1: Disable broken nsDisplayTransform::IsUniform() logic to avoid unnecessary work
https://reviewboard.mozilla.org/r/247612/#review253712
::: layout/painting/nsDisplayList.cpp:9036
(Diff revision 1)
> * works.
> */
> Maybe<nscolor>
> nsDisplayTransform::IsUniform(nsDisplayListBuilder *aBuilder) const
> {
> +#if 0
Can we just delete this code instead?
Comment 9•7 years ago
|
||
mozreview-review |
Comment on attachment 8981497 [details]
Bug 1465118 - Part 2: Remove unused nsDisplayTransform contructor
https://reviewboard.mozilla.org/r/247614/#review253714
Attachment #8981497 -
Flags: review?(matt.woodrow) → review+
Comment 10•7 years ago
|
||
mozreview-review |
Comment on attachment 8981498 [details]
Bug 1465118 - Part 3: Use Maybe<T> to cache transformation matrix
https://reviewboard.mozilla.org/r/247616/#review253716
Attachment #8981498 -
Flags: review?(matt.woodrow) → review+
Comment 11•7 years ago
|
||
mozreview-review |
Comment on attachment 8981499 [details]
Bug 1465118 - Part 4: Cache inverted transformation matrix for nsDisplayTransform
https://reviewboard.mozilla.org/r/247618/#review253718
::: layout/painting/nsDisplayList.cpp:8511
(Diff revision 2)
> +{
> + if (mInverseTransform) {
> + return *mInverseTransform;
> + }
> +
> + MOZ_ASSERT(!GetTransform().IsSingular());
How do we prevent this from being hit?
CSS can specify an arbitrary 4x4 matrix, which can definitely be singular.
Maybe that means we end up with an empty visible region and don't build the display item?
Attachment #8981499 -
Flags: review?(matt.woodrow) → review+
Assignee | ||
Comment 12•7 years ago
|
||
(In reply to Matt Woodrow (:mattwoodrow) from comment #8)
> Comment on attachment 8981496 [details]
> Bug 1465118 - Part 1: Disable broken nsDisplayTransform::IsUniform() logic
> to avoid unnecessary work
>
> https://reviewboard.mozilla.org/r/247612/#review253712
>
> ::: layout/painting/nsDisplayList.cpp:9036
> (Diff revision 1)
> > * works.
> > */
> > Maybe<nscolor>
> > nsDisplayTransform::IsUniform(nsDisplayListBuilder *aBuilder) const
> > {
> > +#if 0
>
> Can we just delete this code instead?
I was thinking of fixing this as part of the bug 1464923. Or do you think that it is not worth it?
(In reply to Matt Woodrow (:mattwoodrow) from comment #11)
> Comment on attachment 8981499 [details]
> Bug 1465118 - Part 4: Cache inverted transformation matrix for
> nsDisplayTransform
>
> https://reviewboard.mozilla.org/r/247618/#review253718
>
> ::: layout/painting/nsDisplayList.cpp:8511
> (Diff revision 2)
> > +{
> > + if (mInverseTransform) {
> > + return *mInverseTransform;
> > + }
> > +
> > + MOZ_ASSERT(!GetTransform().IsSingular());
>
> How do we prevent this from being hit?
>
> CSS can specify an arbitrary 4x4 matrix, which can definitely be singular.
>
> Maybe that means we end up with an empty visible region and don't build the
> display item?
This same check is done at the only call site of this function, nsDisplayTransform::UntransformRect().
Comment 13•7 years ago
|
||
(In reply to Miko Mynttinen [:miko] from comment #12)
> (In reply to Matt Woodrow (:mattwoodrow) from comment #8)
> > Comment on attachment 8981496 [details]
> > Bug 1465118 - Part 1: Disable broken nsDisplayTransform::IsUniform() logic
> > to avoid unnecessary work
> >
> > https://reviewboard.mozilla.org/r/247612/#review253712
> >
> > ::: layout/painting/nsDisplayList.cpp:9036
> > (Diff revision 1)
> > > * works.
> > > */
> > > Maybe<nscolor>
> > > nsDisplayTransform::IsUniform(nsDisplayListBuilder *aBuilder) const
> > > {
> > > +#if 0
> >
> > Can we just delete this code instead?
>
> I was thinking of fixing this as part of the bug 1464923. Or do you think
> that it is not worth it?
Without a use case where we can see that it matters, I certainly wouldn't bother.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 18•7 years ago
|
||
(In reply to Matt Woodrow (:mattwoodrow) from comment #13)
> (In reply to Miko Mynttinen [:miko] from comment #12)
> > (In reply to Matt Woodrow (:mattwoodrow) from comment #8)
> > > Comment on attachment 8981496 [details]
> > > Bug 1465118 - Part 1: Disable broken nsDisplayTransform::IsUniform() logic
> > > to avoid unnecessary work
> > >
> > > https://reviewboard.mozilla.org/r/247612/#review253712
> > >
> > > ::: layout/painting/nsDisplayList.cpp:9036
> > > (Diff revision 1)
> > > > * works.
> > > > */
> > > > Maybe<nscolor>
> > > > nsDisplayTransform::IsUniform(nsDisplayListBuilder *aBuilder) const
> > > > {
> > > > +#if 0
> > >
> > > Can we just delete this code instead?
> >
> > I was thinking of fixing this as part of the bug 1464923. Or do you think
> > that it is not worth it?
>
> Without a use case where we can see that it matters, I certainly wouldn't
> bother.
This code is now removed.
Comment 19•7 years ago
|
||
mozreview-review |
Comment on attachment 8981496 [details]
Bug 1465118 - Part 1: Disable broken nsDisplayTransform::IsUniform() logic to avoid unnecessary work
https://reviewboard.mozilla.org/r/247612/#review254910
Attachment #8981496 -
Flags: review?(matt.woodrow) → review+
Comment 20•7 years ago
|
||
Pushed by mikokm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/2bb74a17a766
Part 1: Disable broken nsDisplayTransform::IsUniform() logic to avoid unnecessary work r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/6a9d2ad04ed2
Part 2: Remove unused nsDisplayTransform contructor r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/e6e9ebdf189f
Part 3: Use Maybe<T> to cache transformation matrix r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/74cadc564216
Part 4: Cache inverted transformation matrix for nsDisplayTransform r=mattwoodrow
Comment 21•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2bb74a17a766
https://hg.mozilla.org/mozilla-central/rev/6a9d2ad04ed2
https://hg.mozilla.org/mozilla-central/rev/e6e9ebdf189f
https://hg.mozilla.org/mozilla-central/rev/74cadc564216
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox62:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in
before you can comment on or make changes to this bug.
Description
•