mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Document that OpacityLayer's children are nonempty (flutter/engine#8707)
See https://github.com/flutter/flutter/issues/31517
This commit is contained in:
parent
0163a0e8dc
commit
39e920cd1a
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user