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

Extend segment building to handle clip in/out, multiple clip regions. #2242

Merged
merged 4 commits into from Dec 20, 2017
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Fix borders with pre-built segments not checking clip mask kind.

  • Loading branch information
gw3583 committed Dec 20, 2017
commit 479e48f53cb4a92cba7302ee72dca23a3896a8eb
@@ -1330,15 +1330,24 @@ impl PrimitiveStore {

let metadata = &self.cpu_metadata[prim_index.0];
let brush = &mut self.cpu_brushes[metadata.cpu_prim_index.0];
if !brush.kind.is_solid() {
return;
}
if metadata.local_rect.size.area() <= MIN_BRUSH_SPLIT_AREA {
return;
}
if let Some(ref segment_desc) = brush.segment_desc {
if segment_desc.clip_mask_kind != BrushClipMaskKind::Unknown {
return;

match brush.segment_desc {
Some(ref segment_desc) => {
// If we already have a segment descriptor, only run through the
// clips list if we haven't already determined the mask kind.
if segment_desc.clip_mask_kind != BrushClipMaskKind::Unknown {
return;
}
}
None => {
// If no segment descriptor built yet, see if it is a brush
// type that wants to be segmented.
if !brush.kind.is_solid() {
return;
}
if metadata.local_rect.size.area() <= MIN_BRUSH_SPLIT_AREA {
return;
}
}
}

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