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

Clipping issues in webrender #11562

Closed
Gozala opened this issue Jun 2, 2016 · 1 comment
Closed

Clipping issues in webrender #11562

Gozala opened this issue Jun 2, 2016 · 1 comment

Comments

@Gozala
Copy link
Contributor

@Gozala Gozala commented Jun 2, 2016

Here is an example to reproduce the issue:

https://jsbin.com/fonumu

It renders as follows:

screen shot 2016-06-02 at 11 37 22 am

Issue is that image is not clipped properly, I believe it's related to the exception case @pcwalton mentioned in his webrender talk at rust meetup:

  • Typically, all display items can be batched together to minimize state changes.
  • Exceptions are if we run out of texture space in an atlas or have a clipping region that isn't a (rounded) rectangle.
Gozala added a commit to Gozala/browser.html that referenced this issue Jun 2, 2016
There are clipping issue servo/servo#11562 in webrender that occurs when clipping rounder region with in the rounded region. This change removes border-radius on body that was rounder for no apparent reason & there for avoids above mentioned issues in webrender.
bors-servo added a commit to servo/webrender that referenced this issue Aug 8, 2016
Omit nested clip regions if internal one is their subregion

In case of nested clipping regions it is common that external ones do contain the most internal clipping region and essentially only that internal one should be used.
I'm not sure that this is the correct path, but it's rather common ([servo/issues/11562](servo/servo#11562), [servo/issues/11857](servo/servo#11857)) and at least can be used as a fast path if the supposed full of nested clipping regions is rather heavy.

This PR implements this fast path. It relies on the fact that int nested regions list the last is the innermost.

While not sure that it's a good idea at all, looks like a hack, but still...

If there are any thought hot to implement full nested regions support I'll try to implement those (Or may be it will be done in WR2 and there is no need to do this right now).
@paulrouget
Copy link
Contributor

@paulrouget paulrouget commented Aug 18, 2016

Works now.

@paulrouget paulrouget closed this Aug 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

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