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

Switch opacity bindings to array, and optimize size of BrushPrimitive. #3336

Merged
merged 2 commits into from Nov 22, 2018

Conversation

@gw3583
Copy link
Collaborator

commented Nov 22, 2018

This change is Reviewable

gw3583 added 2 commits Nov 22, 2018
This is going to simplify porting rectangles and images to be
interned primitives.
This is a temporary fix (won't be applicable once types are
interned). However, it's such a big difference that I think it's
worth landing in the interim.

It drops the size of the BrushKind enum from 1632 bytes down to
168 bytes. This structure is a critical struct that is used
for every (non-interned) primitive.
@gw3583

This comment has been minimized.

Copy link
Collaborator Author

commented Nov 22, 2018

r? @nical or @kvark or anyone

There are two patches here.

The first moves opacity binding from being inline in the brush primitive to being a separate array. This makes things easier once I intern images and rectangles.

The second patch makes the border segments be a vec instead of a smallvec. I noticed that the size of the BrushPrimitive was very large, which is fixed by this. This is a temporary fix, it won't be needed once the primitives are interned, but it is a big enough win that it's worth having for now. It drops the size of each BrushKind from 1632 bytes down to 168 bytes. This drops the dl_mutate talos test from ~5300 to ~4700, which is a significant win.

@gw3583

This comment has been minimized.

@gw3583

This comment has been minimized.

Copy link
Collaborator Author

commented Nov 22, 2018

Try run looks good.

@nical

This comment has been minimized.

Copy link
Collaborator

commented Nov 22, 2018

It'd be nice to sotre segments in a separate vec (or segmented vec) in the primitive store or some per-cluster data structure and refer to them by ids like this PR does with opacity bindings.

@bors-servo r+

@bors-servo

This comment has been minimized.

Copy link
Contributor

commented Nov 22, 2018

📌 Commit 4f198c6 has been approved by nical

@bors-servo

This comment has been minimized.

Copy link
Contributor

commented Nov 22, 2018

⌛️ Testing commit 4f198c6 with merge 29dab25...

bors-servo added a commit that referenced this pull request Nov 22, 2018
Switch opacity bindings to array, and optimize size of BrushPrimitive.

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

This comment has been minimized.

Copy link
Contributor

commented Nov 22, 2018

☀️ Test successful - status-appveyor, status-taskcluster
Approved by: nical
Pushing 29dab25 to master...

@bors-servo bors-servo merged commit 4f198c6 into servo:master Nov 22, 2018
3 checks passed
3 checks passed
Taskcluster (pull_request) TaskGroup: success
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Nov 23, 2018
…87b78846c7f6 (WR PR #3336). r=kats

servo/webrender#3336

Differential Revision: https://phabricator.services.mozilla.com/D12696

--HG--
extra : moz-landing-system : lando
jankeromnes pushed a commit to jankeromnes/gecko that referenced this pull request Nov 23, 2018
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 3, 2019
…87b78846c7f6 (WR PR #3336). r=kats

servo/webrender#3336

Differential Revision: https://phabricator.services.mozilla.com/D12696

UltraBlame original commit: 76fb27eae36a4c9b9c01b2a71de2b535cf3d3643
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 3, 2019
…87b78846c7f6 (WR PR #3336). r=kats

servo/webrender#3336

Differential Revision: https://phabricator.services.mozilla.com/D12696

UltraBlame original commit: 76fb27eae36a4c9b9c01b2a71de2b535cf3d3643
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 3, 2019
…87b78846c7f6 (WR PR #3336). r=kats

servo/webrender#3336

Differential Revision: https://phabricator.services.mozilla.com/D12696

UltraBlame original commit: 76fb27eae36a4c9b9c01b2a71de2b535cf3d3643
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.