mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Fallback to compose shapes as their bounding rectangles. (#4553)
Scenic doesn't currently support arbitrary shaped frames.
This commit is contained in:
parent
a1328e7730
commit
e1e97b9130
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user