未验证 提交 e1e97b91 编写于 作者: A amirh 提交者: GitHub

Fallback to compose shapes as their bounding rectangles. (#4553)

Scenic doesn't currently support arbitrary shaped frames.
上级 a1328e77
...@@ -23,6 +23,12 @@ class PhysicalShapeLayer : public ContainerLayer { ...@@ -23,6 +23,12 @@ class PhysicalShapeLayer : public ContainerLayer {
frameRRect_ = SkRRect::MakeRect(rect); frameRRect_ = SkRRect::MakeRect(rect);
} else if (path.isRRect(&frameRRect_)) { } else if (path.isRRect(&frameRRect_)) {
isRect_ = frameRRect_.isRect(); 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());
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册