test we already have SkPicture::drawsNothing()

I was about to add a new call here, but for users like Flutter that are
using an R-tree, we may already have a precise drawsNothing() call.

There are a couple simple specializations of SkPicture, but they'll
already return the right answer:

   - an SkEmptyPicture will return empty bounds
   - a single-draw SkMiniPicture will return the bounds of that draw

That leaves the general SkBigPicture case.  With an R-tree we'll
calculate the bounds of every draw in the picture, unioning them up into
the cullRect() of the picture itself.

So cullRect().isEmpty() should mostly just work as drawsNothing()
already?

Bug: skia:9411
Change-Id: I5e5dfc21cb7c5c77d173ebee2e91e7bef880367b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240973
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
1 file changed