diff --git a/flow/layers/physical_shape_layer.h b/flow/layers/physical_shape_layer.h index 4e82ac69343f2750ba469aee9cb9af92e102eeac..db6d756462acd1ccac170a2ee0077296e8c46597 100644 --- a/flow/layers/physical_shape_layer.h +++ b/flow/layers/physical_shape_layer.h @@ -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()); } }