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

Fix some issues related to clip optimization across coordinate systems #2324

Closed
Closed
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Replace root coordinate space optimization

This check is no longer necessarily true with the introduction of
ClipChains, which make it harder to make assumptions about what the
coordinate system of our clip chain looks like.

Instead replace it with a similar check, which should cover more
situations. When our clip chain only contains clips from our local
coordinate system and they are all optimized away, just rely on the
calculated local clip rect.
  • Loading branch information
mrobinson committed Jan 18, 2018
commit c8bdc6076d3e3fbe79a136bd786bb51bac8d55bb
@@ -1583,12 +1583,13 @@ impl PrimitiveStore {
&mut has_clips_from_other_coordinate_systems
);

// This can happen if we had no clips or if all the clips were optimized away. In
// some cases we still need to create a clip mask in order to create a rectangular
// clip in screen space coordinates.
if clips.is_empty() {
// If this item is in the root coordinate system, then
// we know that the local_clip_rect in the clip node
// will take care of applying this clip, so no need
// for a mask.
if prim_coordinate_system_id == CoordinateSystemId::root() {
// If we don't have any clips from other coordinate systems, the local clip
// calculated from the clip chain should be sufficient to ensure proper clipping.
if !has_clips_from_other_coordinate_systems {
return true;
}

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.