Skip to content

Commit

Permalink
Always save canvas and correctly pass antialias boolean in ClipRects. (
Browse files Browse the repository at this point in the history
  • Loading branch information
GaryQian authored Sep 7, 2018
1 parent 16c56af commit 93dac2a
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 @@ -41,8 +41,8 @@ void ClipRectLayer::Paint(PaintContext& context) const {
TRACE_EVENT0("flutter", "ClipRectLayer::Paint");
FML_DCHECK(needs_painting());

SkAutoCanvasRestore save(&context.canvas, clip_behavior_ != Clip::hardEdge);
context.canvas.clipRect(paint_bounds());
SkAutoCanvasRestore save(&context.canvas, true);
context.canvas.clipRect(paint_bounds(), clip_behavior_ != Clip::hardEdge);
if (clip_behavior_ == Clip::antiAliasWithSaveLayer) {
context.canvas.saveLayer(paint_bounds(), nullptr);
}
Expand Down

0 comments on commit 93dac2a

Please sign in to comment.