Skip to content

WR update: preserve-3d support - #16775

Closed
kvark wants to merge 2 commits into
servo:masterfrom
kvark:preserve3d
Closed

kvark wants to merge 2 commits into
servo:masterfrom
kvark:preserve3d

Conversation

@kvark

@kvark kvark commented May 8, 2017 •

Copy link
Copy Markdown
Member

This is WR update to servo/webrender@d335555 having new features:

Edit: the references to bincode serialization and border styles are removed from here, since they are already integrated into Servo.
Edit2: this is alternative/similar to #16801, based on @mrobinson code (see first commit).


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #__ (github issue number if applicable).

Related to #9087
Note that I'm unlocking a few tests as well as changing some related to preserve-3d. The changes come from common sense and comparison to Chromium. I'm ready to discuss them on a individual basis.

  • There are tests for these changes OR
  • These changes do not require tests because _____

There is still an investigation to do with regards to the differences of preserve3d logic between Blink and Gecko.


This change is Reviewable

@highfive highfive assigned ghost May 8, 2017
@highfive

highfive commented May 8, 2017

Copy link
Copy Markdown

Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @wafflespeanut (or someone else) soon.

@highfive

highfive commented May 8, 2017

Copy link
Copy Markdown

Heads up! This PR modifies the following files:

  • @bholley: components/style/properties/properties.mako.rs
  • @emilio: components/layout/display_list_builder.rs, components/layout/webrender_helpers.rs, components/style/properties/properties.mako.rs, components/layout/fragment.rs

@highfive

highfive commented May 8, 2017

Copy link
Copy Markdown

warning Warning warning

  • This pull request modifies the contents of
    tests/wpt/css-tests/, which are overwriten occasionally whenever the
    directory is synced from upstream.

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label May 8, 2017
let current_stacking_context_id = state.current_stacking_context_id;
let current_scroll_root_id = state.current_scroll_root_id;
let stacking_context = fragment.create_stacking_context(
fragment.stacking_context_id,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: indentation seems weird here.

effects.mix_blend_mode != mix_blend_mode::T::normal ||
!effects.clip.is_auto() ||
effects.mix_blend_mode != mix_blend_mode::T::normal {
return transform_style::T::flat;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, did this happen to do the right thing?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, no, i guess it didn't :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the old wording was really confusing. I think the old logic could be rewritten as

if effects.opacity < 1.0 ||
            !effects.filter.is_empty() ||
            !effects.clip.is_auto() {
            if effects.mix_blend_mode == mix_blend_mode::T::normal {
                return transform_style::T::flat;
            }
}

My assumption was that it's just a refactoring bug, where someone mixed the || with { at the end of the lines.

transform-origin: right"></div>
<div style="height: 100px; width: 50px; background: red;
transform: translateY(-100px) rotateX(45deg) rotateY(45deg);
transform-origin: right"></div>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not suer if we can upstream this changes right now. @jdm?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, given these tests are in wpt, I don't think we should change them at all. I guess these pass on both Blink and Gecko?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'll revert them and keep disabled then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we have tests that differ between gecko/chromium, or fail in WR due to incomplete features - we can disable them in the test metadata, for now.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, these change will need manual upstreaming.

@kvark kvark changed the title WR update: preserve-3d, new borders, bincode serialization WR update: preserve-3d support May 8, 2017
Comment thread components/servo/lib.rs Outdated
enable_aa: opts.enable_text_antialiasing,
enable_profiler: opts.webrender_stats,
debug: opts.webrender_debug,
enable_batcher: false, //TEMP

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll want to fix this up before any merging!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops :) nicely spotted!

@kvark
kvark force-pushed the preserve3d branch 4 times, most recently from 57f8581 to af21ea2 Compare May 13, 2017 02:24
@kvark

kvark commented May 13, 2017

Copy link
Copy Markdown
Member Author

@emilio thanks for taking a look! Everything should be addressed now.

@emilio emilio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me with that.

Thanks!

@@ -0,0 +1,3 @@
[transform3d-sorting-004.htm]
type: reftest
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1362543

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need to disable these?

We can just mark them as failing with a link to that bug.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried multiple things, didn't find how to add comments to those ini files

@kvark

kvark commented May 14, 2017

Copy link
Copy Markdown
Member Author

@emilio thanks!
@bors-servo r=emilio

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 3a511ee has been approved by emilio

@highfive highfive assigned emilio and unassigned ghost May 14, 2017
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels May 14, 2017
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 3a511ee with merge 06c5424...

bors-servo pushed a commit that referenced this pull request May 14, 2017
WR update: preserve-3d support

<!-- Please describe your changes on the following line: -->

This is WR update to servo/webrender@d335555 having new features:
  - limited "preserve-3d" support (servo/webrender#1169, servo/webrender#1208)
  - rayon thread pool (servo/webrender#1202)
  - further border rendering improvements

Edit: the references to bincode serialization and border styles are removed from here, since they are already integrated into Servo.
Edit2: this is alternative/similar to  #16801, based on @mrobinson code (see first commit).

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

Related to #9087
Note that I'm unlocking a few tests as well as changing some related to `preserve-3d`. The changes come from common sense and comparison to Chromium. I'm ready to discuss them on a individual basis.

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____

There is still an investigation to do with regards to the differences of preserve3d logic between Blink and Gecko.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- 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/16775)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel-css

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels May 14, 2017
@emilio

emilio commented May 14, 2017

Copy link
Copy Markdown
Member
  ▶ PASS [expected FAIL] /compositing-1_dev/html/mix-blend-mode-intermediate-element-overflow-hidden-and-border-radius.htm

  ▶ PASS [expected FAIL] /css-backgrounds-3_dev/html4/border-bottom-right-radius-010.htm

  ▶ PASS [expected FAIL] /css-backgrounds-3_dev/html4/border-bottom-left-radius-010.htm

  ▶ PASS [expected FAIL] /css-backgrounds-3_dev/html4/border-top-left-radius-010.htm

  ▶ PASS [expected FAIL] /css-backgrounds-3_dev/html4/border-top-right-radius-010.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-3d-rotateY-stair-below-001.htm

  ▶ FAIL [expected PASS] /css-transforms-1_dev/html/transform-3d-rotateY-stair-above-001.htm
  └   → /css-transforms-1_dev/html/transform-3d-rotateY-stair-above-001.htm f5edea3f9bcf9f3852f2959341726fa2da8225e0
/css-transforms-1_dev/html/reference/transform-3d-rotateY-stair-above-ref-001.htm 22397e5af63eece9a8c29e2619e2ec9e356aa97e
Testing f5edea3f9bcf9f3852f2959341726fa2da8225e0 == 22397e5af63eece9a8c29e2619e2ec9e356aa97e

@glennw

glennw commented May 14, 2017 •

Copy link
Copy Markdown
Member

Superseded by #16860

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-tests-failed The changes caused existing tests to fail.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants