Skip to content

Commit

Permalink
Fallback to compose shapes as their bounding rectangles. (flutter#4553)
Browse files Browse the repository at this point in the history
Scenic doesn't currently support arbitrary shaped frames.
  • Loading branch information
amirh authored Jan 17, 2018
1 parent a1328e7 commit e1e97b9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions flow/layers/physical_shape_layer.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ class PhysicalShapeLayer : public ContainerLayer {
frameRRect_ = SkRRect::MakeRect(rect);
} else if (path.isRRect(&frameRRect_)) {
isRect_ = frameRRect_.isRect();
} else {
// Fuchsia's compositor currently only supports rounded rectangle frames.
// For shapes that cannot be represented as a rounded rectangle we
// default to use the bounding rectangle.
// TODO(amirh): fix this once Fuchsia supports arbitrary shaped frames.
frameRRect_ = SkRRect::MakeRect(path.getBounds());
}
}

Expand Down

0 comments on commit e1e97b9

Please sign in to comment.