Skip to content

Commit

Permalink
Clip to clip_rect instead of paint bounds (flutter#8183)
Browse files Browse the repository at this point in the history
Otherwise, we'll have issues such as flutter/flutter#29070

The engine roll that includes this PR needs a tiny golden image update. Will do a manual roll.
  • Loading branch information
liyuqian authored Mar 18, 2019
1 parent 8818a6c commit 5088735
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flow/layers/clip_rect_layer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 5088735

Please sign in to comment.