Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stylo: Bug 1335998 - Handle interpolation and accumulation of mismatched transform lists #17202

Merged

Conversation

@BorisChiou
Copy link
Contributor

BorisChiou commented Jun 7, 2017

These are the interdependent patches of Bug 1335998. We want to do interpolation and accumulation for mismatched transform lists, so introduce ComputedOperation::InterpolateMatrix and ComputedOperation::Accumulation. Both arms store the from_list and to_list, and resolve them until we have the layout information. For the Servo part, we haven't implemented how to read the transform lists in layout/fragment.rs, but I think it would be easy. (related issue #13267)


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix Bug 1335998
  • There are tests for these changes

This change is Reviewable

BorisChiou added 4 commits May 25, 2017
We use this arm to store the interpolated result of two mismatched
transform lists, and we resolve it until we know the reference box size
(on Gecko side). The conversion from ComputedOperation::InterpolateMatrix
to eCSSKeyword_interpolatematrix will be implemented later in this patch series.
If we set the composite operation to accumulate, we may need to accumulate two
mismatched transform lists, and then to interpolate them. In order to
accumulate two mismatched transform lists, we also need the reference
box information, so use the same idea as that for interpolation. i.e.
use AccmulateMatrix to store it temporarily, and convert it into matrix
later.
… type.

We convert ComputedOperation::{Accumulate, Interpolate}Matrix into gecko type
not on the main thread, so we cannot use nsCSSValueList_heap (which is not
thread safe so we cannot create it and destroy it on different threads).
Therefore, we use nsCSSValueSharedList to represent the cloned
from_list/to_list. In this patch, we also implement the reversing way,
i.e. Convert eCSSKeyword_{accumulate, interpolate}matrix into
{Accumulate, Interpolate}Matrix.
@highfive
Copy link

highfive commented Jun 7, 2017

Heads up! This PR modifies the following files:

  • @bholley: components/style/gecko/generated/structs_debug.rs, components/style/gecko/generated/structs_release.rs, components/style/gecko/generated/bindings.rs, components/style/properties/gecko.mako.rs, components/style/gecko_bindings/sugar/ns_css_value.rs and 2 more
  • @emilio: components/layout/fragment.rs, components/style/gecko/generated/structs_debug.rs, ports/geckolib/glue.rs, components/style/gecko/generated/structs_release.rs, components/style/gecko/generated/bindings.rs and 4 more
@highfive
Copy link

highfive commented Jun 7, 2017

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!
BorisChiou added 2 commits Jun 7, 2017
…rpolation/recomposition.

We use Servo backend to decompose/interpolate/recompose matrices on both
main thread and compositor thread.
@BorisChiou BorisChiou force-pushed the BorisChiou:stylo/animation/mismatched_transform branch from a1f6b55 to a2a19f0 Jun 7, 2017
@BorisChiou
Copy link
Contributor Author

BorisChiou commented Jun 7, 2017

@bors-servo
Copy link
Contributor

bors-servo commented Jun 7, 2017

Trying commit a2a19f0 with merge 9a3bade...

bors-servo added a commit that referenced this pull request Jun 7, 2017
…m, r=<try>

stylo: Bug 1335998 - Handle interpolation and accumulation of mismatched transform lists

These are the interdependent patches of Bug 1335998. We want to do interpolation and accumulation for mismatched transform lists, so introduce ComputedOperation::InterpolateMatrix and ComputedOperation::Accumulation. Both arms store the from_list and to_list, and resolve them until we have the layout information. For the Servo part, we haven't implemented how to read the transform lists in layout/fragment.rs, but I think it would be easy. (related issue #13267)

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1335998](https://bugzilla.mozilla.org/show_bug.cgi?id=1335998)
- [X] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17202)
<!-- Reviewable:end -->
@BorisChiou
Copy link
Contributor Author

BorisChiou commented Jun 7, 2017

@BorisChiou
Copy link
Contributor Author

BorisChiou commented Jun 7, 2017

@bors-servo r=Manishearth,birtles

@bors-servo
Copy link
Contributor

bors-servo commented Jun 7, 2017

📌 Commit a2a19f0 has been approved by Manishearth,birtles

@bors-servo
Copy link
Contributor

bors-servo commented Jun 7, 2017

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev
Approved by: Manishearth,birtles
Pushing 9a3bade to master...

@bors-servo
Copy link
Contributor

bors-servo commented Jun 7, 2017

👀 Test was successful, but fast-forwarding failed: 422 Update is not a fast forward

@Manishearth
Copy link
Member

Manishearth commented Jun 7, 2017

@bors-servo retry

Did someone manual merge something? O.o

@BorisChiou
Copy link
Contributor Author

BorisChiou commented Jun 7, 2017

OK, let me rebase it

@BorisChiou
Copy link
Contributor Author

BorisChiou commented Jun 7, 2017

Oh, you retry it. let's wait

@BorisChiou
Copy link
Contributor Author

BorisChiou commented Jun 7, 2017

@bors-servo
Copy link
Contributor

bors-servo commented Jun 7, 2017

Testing commit a2a19f0 with merge f4a7204...

bors-servo added a commit that referenced this pull request Jun 7, 2017
…m, r=Manishearth,birtles

stylo: Bug 1335998 - Handle interpolation and accumulation of mismatched transform lists

These are the interdependent patches of Bug 1335998. We want to do interpolation and accumulation for mismatched transform lists, so introduce ComputedOperation::InterpolateMatrix and ComputedOperation::Accumulation. Both arms store the from_list and to_list, and resolve them until we have the layout information. For the Servo part, we haven't implemented how to read the transform lists in layout/fragment.rs, but I think it would be easy. (related issue #13267)

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1335998](https://bugzilla.mozilla.org/show_bug.cgi?id=1335998)
- [X] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17202)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jun 7, 2017

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev
Approved by: Manishearth,birtles
Pushing f4a7204 to master...

@bors-servo bors-servo merged commit a2a19f0 into servo:master Jun 7, 2017
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.