Document that OpacityLayer's children are nonempty (flutter/engine#8707)
See https://github.com/flutter/flutter/issues/31517
This commit is contained in:
@@ -9,6 +9,10 @@
|
||||
|
||||
namespace flutter {
|
||||
|
||||
// Don't add an OpacityLayer with no children to the layer tree. Painting an
|
||||
// OpacityLayer is very costly due to the saveLayer call. If there's no child,
|
||||
// having the OpacityLayer or not has the same effect. In debug_unopt build, the
|
||||
// |EnsureSingleChild| will assert if there are no children.
|
||||
class OpacityLayer : public ContainerLayer {
|
||||
public:
|
||||
OpacityLayer();
|
||||
|
||||
Reference in New Issue
Block a user