mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Clip to clip_rect instead of paint bounds (flutter/engine#8183)
Otherwise, we'll have issues such as https://github.com/flutter/flutter/issues/29070 The engine roll that includes this PR needs a tiny golden image update. Will do a manual roll.
This commit is contained in:
parent
ad2a9d7c53
commit
ffb58ce65d
@ -48,10 +48,10 @@ void ClipRectLayer::Paint(PaintContext& context) const {
|
||||
FML_DCHECK(needs_painting());
|
||||
|
||||
SkAutoCanvasRestore save(context.internal_nodes_canvas, true);
|
||||
context.internal_nodes_canvas->clipRect(paint_bounds(),
|
||||
context.internal_nodes_canvas->clipRect(clip_rect_,
|
||||
clip_behavior_ != Clip::hardEdge);
|
||||
if (clip_behavior_ == Clip::antiAliasWithSaveLayer) {
|
||||
context.internal_nodes_canvas->saveLayer(paint_bounds(), nullptr);
|
||||
context.internal_nodes_canvas->saveLayer(clip_rect_, nullptr);
|
||||
}
|
||||
PaintChildren(context);
|
||||
if (clip_behavior_ == Clip::antiAliasWithSaveLayer) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user