Skip to content

Clip stack collapse path #595

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

Merged
merged 5 commits into from
Nov 28, 2016
Merged

Clip stack collapse path #595

merged 5 commits into from
Nov 28, 2016

Conversation

kvark
Copy link
Member

@kvark kvark commented Nov 25, 2016

Based on #581
Implements the 3rd option explained in #581 (comment) as an optional code path, controlled by CLIP_TASK_COLLAPSE, enabled by default.


This change is Reviewable

@glennw
Copy link
Member

glennw commented Nov 28, 2016

Reviewed 14 of 14 files at r1.
Review status: all files reviewed at latest revision, 2 unresolved discussions.


webrender/src/tiling.rs, line 616 at r1 (raw file):

                        let mask_task_index = match ctx.layer_masks_tasks.get(&(task.tile_id, sc_index)) {
                            Some(ref mask_task_id) => render_tasks.get_task_index(mask_task_id, child_pass_index),
                            None => RenderTaskIndex(i32::MAX as usize), // special sentinel value recognized by the shader

This should be OPAQUE_TASK_INDEX I think.


webrender/src/tiling.rs, line 1750 at r1 (raw file):

    fn build(self, passes: &mut Vec<RenderPass>) {
        //println!("{:#?}", self.main_render_task);

Can be removed


Comments from Reviewable

@glennw
Copy link
Member

glennw commented Nov 28, 2016

@kvark This looks great! Two very minor nits, then it looks good to me.

Before merging, I'd like to just get @mrobinson to make sure the stacking context interface change is OK. Instead of having an overflow rect in the stacking context, the method to push a new stacking context now takes a clip region, which can be a normal rect, but could include an image mask etc. Does this interface change have any implications for the scroll root code?

@bors-servo
Copy link
Contributor

☔ The latest upstream changes (presumably #592) made this pull request unmergeable. Please resolve the merge conflicts.

…gle.

Renamed prim_store::PrimitiveClipSource to mask_cache::ClipSource.
Creating dependent tasks for the layers.
clip copy shader.
Nested clipping and some text for the wr-sample.
…all.

Fixed the needs_clipping flag to avoid blending where not necessary.
@kvark
Copy link
Member Author

kvark commented Nov 28, 2016

Review status: all files reviewed at latest revision, 2 unresolved discussions, some commit checks failed.


webrender/src/tiling.rs, line 616 at r1 (raw file):

Previously, glennw (Glenn Watson) wrote…

This should be OPAQUE_TASK_INDEX I think.

That was added when I needed it on multiple occasions, but it was removed later on. Anyway, I re-added it back now :)


webrender/src/tiling.rs, line 1750 at r1 (raw file):

Previously, glennw (Glenn Watson) wrote…

Can be removed

ok


Comments from Reviewable

@kvark
Copy link
Member Author

kvark commented Nov 28, 2016

All concerns are addressed, and the PR is rebased now.

@glennw
Copy link
Member

glennw commented Nov 28, 2016

@bors-servo r+

@bors-servo
Copy link
Contributor

📌 Commit 03ce061 has been approved by glennw

bors-servo pushed a commit that referenced this pull request Nov 28, 2016
Clip stack collapse path

Based on #581
Implements the 3rd option explained in #581 (comment) as an optional code path, controlled by `CLIP_TASK_COLLAPSE`, enabled by default.

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

⌛ Testing commit 03ce061 with merge 6ca1329...

@kvark kvark mentioned this pull request Nov 28, 2016
@bors-servo
Copy link
Contributor

☀️ Test successful - status-travis

@bors-servo bors-servo merged commit 03ce061 into servo:master Nov 28, 2016
@kvark kvark deleted the clip_collapse branch November 28, 2016 21:37
@kvark kvark mentioned this pull request Nov 30, 2016
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants