From 26eb16f1e3b9c2c26042e5078636b3e5ac42b9ea Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Mon, 10 Apr 2017 09:50:25 -0400 Subject: calculate cull rects for SkMiniPictures This is the other half of https://skia-review.googlesource.com/c/7874/, adding the cull-shrinking feature of SkBigPictures to SkMiniPictures. Like SkBigPictures, shrink only when we're asked to build an R-tree. (We don't actually build a tree for one rect, of course.) We could do unconditionally, but SkPictureImageFilter uses the cull rect as its crop. It's unclear to me what this image filter unit test I've changed here was intending... had it had two draws we would have shrunk its cull, but because it was hitting the 1-draw SkMiniPicture path it kept the larger user-supplied cull. As the test doesn't appear to have been written with cull shrinking in mind, I've removed its SkRTreeFactory to keep that feature explicitly disabled there. BUG=skia:5974 Change-Id: I4118d2e85f2a69adef2e7a7fa9b9b8c17607a94f Reviewed-on: https://skia-review.googlesource.com/12624 Reviewed-by: Mike Klein Commit-Queue: Mike Klein --- tests/ImageFilterTest.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tests/ImageFilterTest.cpp') diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp index 56cd5d5250..8a19a226c6 100644 --- a/tests/ImageFilterTest.cpp +++ b/tests/ImageFilterTest.cpp @@ -244,9 +244,8 @@ public: cropRect)); } { - SkRTreeFactory factory; SkPictureRecorder recorder; - SkCanvas* recordingCanvas = recorder.beginRecording(64, 64, &factory, 0); + SkCanvas* recordingCanvas = recorder.beginRecording(64, 64); SkPaint greenPaint; greenPaint.setColor(SK_ColorGREEN); -- cgit v1.2.3