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

Splitting the clipped rectangles into opaque/transparent sub-parts #1005

Merged
merged 1 commit into from Mar 23, 2017

Conversation

@kvark
Copy link
Member

kvark commented Mar 23, 2017

This is a simple optimization targeted at the case of large rectangles with rounded cornered clips. Instead of moving it into the transparent bin and rendering late, we are computing the inner intersection of the clip items and splitting the rectangle into opaque/transparent parts.

On my machine, this reduces the GPU time of https://github.com/servo/servo by approximately 10%: from 4.6ms to 3.9ms. More profiling might be needed, especially on windows.

r? @glennw


This change is Reviewable

@glennw
Copy link
Member

glennw commented Mar 23, 2017

Nice simple change!

@bors-servo r+

@bors-servo
Copy link
Contributor

bors-servo commented Mar 23, 2017

📌 Commit aad5b6a has been approved by glennw

@bors-servo
Copy link
Contributor

bors-servo commented Mar 23, 2017

Testing commit aad5b6a with merge c6f44b9...

bors-servo added a commit that referenced this pull request Mar 23, 2017
Splitting the clipped rectangles into opaque/transparent sub-parts

This is a simple optimization targeted at the case of large rectangles with rounded cornered clips. Instead of moving it into the transparent bin and rendering late, we are computing the inner intersection of the clip items and splitting the rectangle into opaque/transparent parts.

On my machine, this reduces the GPU time of https://github.com/servo/servo by approximately 10%: from 4.6ms to 3.9ms. More profiling might be needed, especially on windows.

r? @glennw

<!-- 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/1005)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Mar 23, 2017

☀️ Test successful - status-travis
Approved by: glennw
Pushing c6f44b9 to master...

@bors-servo bors-servo merged commit aad5b6a into servo:master Mar 23, 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
bors-servo added a commit that referenced this pull request Apr 6, 2017
Inner rectangle compute refactor

This should be cleaner and a bit faster w.r.t the transparency optimization of #1005
r? @glennw

<!-- 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/1076)
<!-- Reviewable:end -->
@kvark kvark deleted the kvark:clip branch Jul 10, 2017
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

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