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

Render solid line decorations in the opaque pass #3232

Merged
merged 1 commit into from Oct 25, 2018

Conversation

Projects
None yet
4 participants
@kvark
Member

kvark commented Oct 25, 2018

Fixes #2831
The draw call count drops from 30000 to 60 :)
When replaying the WR capture on my Geforce 1050 Ti, the refresh rate raises from 9fps to full 60fps.
Due to the batching changes, it may also (positively!) affect other primitives.


This change is Reviewable

@kvark kvark requested a review from gw3583 Oct 25, 2018

@kvark

This comment has been minimized.

@gw3583

Just need to work out if my first comment is correct and fix if required.

@@ -1333,8 +1335,12 @@ impl AlphaBatchBuilder {
}
(None, SegmentDataKind::Shared(ref segment_data)) => {
// No segments, and thus no per-segment instance data.
let needs_blending = !prim_instance.opacity.is_opaque ||

This comment has been minimized.

@gw3583

gw3583 Oct 25, 2018

Collaborator

I don't think this is needed non_segmented_blend_mode is set to BlendMode::None earlier if these conditions are false?

This comment has been minimized.

@kvark

kvark Oct 25, 2018

Member

I see, this makes sense!

This comment has been minimized.

@kvark

kvark Oct 25, 2018

Member

added a comment there to avoid the same mistake in the future ;)

BrushKind::LineDecoration { ref mut handle, style, orientation, wavy_line_thickness, .. } => {
// Work out the device pixel size to be used to cache this line decoration.
BrushKind::LineDecoration { color, ref mut handle, style, orientation, wavy_line_thickness } => {
// Update opacity for this primitive to ensure the correct

This comment has been minimized.

@gw3583

gw3583 Oct 25, 2018

Collaborator

Nice 👍

@gw3583

gw3583 approved these changes Oct 25, 2018

let size = get_line_decoration_sizes(
&prim_local_rect.size,
orientation,
style,
wavy_line_thickness,
);
if is_chased {

This comment has been minimized.

@lqd

lqd Oct 25, 2018

would a if cfg!(debug_assertions) be interesting here as well, to match the other ones ?

@kvark

This comment has been minimized.

Member

kvark commented Oct 25, 2018

Haven't seen such a clean try in a while :)
@bors-servo r=gw3583

@bors-servo

This comment has been minimized.

Contributor

bors-servo commented Oct 25, 2018

📌 Commit e90b716 has been approved by gw3583

@bors-servo

This comment has been minimized.

Contributor

bors-servo commented Oct 25, 2018

⌛️ Testing commit e90b716 with merge 20214bf...

bors-servo added a commit that referenced this pull request Oct 25, 2018

Auto merge of #3232 - kvark:solid-line, r=gw3583
Render solid line decorations in the opaque pass

Fixes #2831
The draw call count drops from 30000 to 60 :)
When replaying the WR capture on my Geforce 1050 Ti, the refresh rate raises from 9fps to full 60fps.
Due to the batching changes, it may also (positively!) affect other primitives.

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

This comment has been minimized.

Contributor

bors-servo commented Oct 25, 2018

☀️ Test successful - status-appveyor, status-taskcluster
Approved by: gw3583
Pushing 20214bf to master...

@bors-servo bors-servo merged commit e90b716 into servo:master Oct 25, 2018

3 checks passed

Taskcluster (pull_request) TaskGroup: success
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details

bors-servo added a commit that referenced this pull request Oct 26, 2018

Auto merge of #3233 - kvark:prepare-opacity, r=gw3583
Prepare opacity consistently

This is a follow-up to #3232
It makes opacity computation more functional, having us to consider it equally important for all primitive types. It's not supposed to change any logic.
try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=6e4ca6f1b473522e93d5fd11e64c563c2bdf50dd

<!-- 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/3233)
<!-- Reviewable:end -->

@kvark kvark deleted the kvark:solid-line branch Oct 26, 2018

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