未验证 提交 5088735e 编写于 作者: L liyuqian 提交者: GitHub

Clip to clip_rect instead of paint bounds (#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.
上级 8818a6c4
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册