Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRemove the per-item mask and complex clip feature #1377
Comments
|
So one potential issue with this, that I didn't notice before, is with the let extra_clips = [ClipSource::Complex(bs_rect,
border_radius,
bs_clip_mode),
// Clip the outside of the box
ClipSource::Complex(*box_bounds,
border_radius,
box_clip_mode)];I believe this means that every box shadow is going to have a node in the clip scroll tree. This might not be too bad, but we need to be careful not to introduce performance regressions now and in the future by accidentally relying on a slow ClipScrollTree. |
|
@mrobinson perhaps, the right way to think about it is within the context of shadow in general. I.e. have a node specifying the shadow to be applied for all children (including text and other things). |
|
With #1412 landing, this feature is gone from the API, but still exists internally to handle the extra_clips property. I think the next step is to move everything to reference frame coordinates internally in order to reduce the total number of ClipScrollGroups. Then we can move extra_clips to the ClipScrollTree and close this. |
|
I think we can close this for now, since it is no longer clear that this is the direction we want to go. Instead we will move toward simplifying the kind of clips that the API will accept. |
The idea is that since masking and complex clips are comparatively uncommon we can rely on the
ClipScrollTreefor them. This will allow us to simplify the clipping code quite a bit and allow deduplication of clips to happen as soon as items are added to the clip scroll tree. The local clip rectangle would remain, since it is handled differently internally and is much more common. This should also reduce the size of the display list.Issues necessary to fix to make this happen: