mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Do not call saveLayer for physical model layers whose bounds are simple rectangles (#11324)
This is similar to an optimization done in PhysicalModelLayer::Paint in the engine
This commit is contained in:
parent
48427cb77a
commit
9d901327a4
@ -1364,7 +1364,11 @@ class RenderPhysicalModel extends _RenderCustomClip<RRect> {
|
||||
);
|
||||
}
|
||||
canvas.drawRRect(offsetClipRRect, new Paint()..color = color);
|
||||
canvas.saveLayer(offsetBounds, _defaultPaint);
|
||||
if (offsetClipRRect.isRect) {
|
||||
canvas.save();
|
||||
} else {
|
||||
canvas.saveLayer(offsetBounds, _defaultPaint);
|
||||
}
|
||||
canvas.clipRRect(offsetClipRRect);
|
||||
super.paint(context, offset);
|
||||
canvas.restore();
|
||||
|
Loading…
Reference in New Issue
Block a user