[sksg] Improved layer elision heuristic

We can skip effect layers when none of the child nodes overlap (treat as
atomic draws, with effects applied on their paint).

The initial heuristic was simply checking for more than one child.

This version relaxes the heuristic to check each child bounds against
the union of preceding siblings.

Change-Id: I2dc6d30d945697f410100db0c46a8a8377d5b569
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269482
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
2 files changed