From 788a2dc754f9da403d297e4a09efe187aeda3229 Mon Sep 17 00:00:00 2001 From: Ben Wagner Date: Wed, 9 May 2018 13:23:38 -0400 Subject: complexclip gm to clip when saving layer with bounds. The complexclip gm currently can do a save layer with some bounds, but doesn't clip to those bounds. As a result when it is rotated it invokes some unspecified behavior by drawing outside the save layer bounds. Change-Id: Ifbdd4b5366a514d1760180dc6d5a74ebfe09d28b Reviewed-on: https://skia-review.googlesource.com/127044 Reviewed-by: Robert Phillips Commit-Queue: Ben Wagner --- gm/complexclip.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'gm/complexclip.cpp') diff --git a/gm/complexclip.cpp b/gm/complexclip.cpp index ae9c4db31f..897c41ea2c 100644 --- a/gm/complexclip.cpp +++ b/gm/complexclip.cpp @@ -114,6 +114,7 @@ protected: boundPaint.setColor(SK_ColorRED); boundPaint.setStyle(SkPaint::kStroke_Style); canvas->drawRect(bounds, boundPaint); + canvas->clipRect(bounds); canvas->saveLayer(&bounds, nullptr); } -- cgit v1.2.3