ccpr: Support caching of paths that span multiple tiles

Adds an accumulative "hit rect" for each cache entry that tracks the
region of the path that has been drawn during its lifetime. Now, a
path mask can be cached once the "hit rect" covers 50% of the path.
This allows us to cache a path that spans multiple tiles.

To guard against unnecessarily caching gigantic path masks, we also
require that 10% of the path be visible during the draw when it is
cached.

Bug: skia:8462
Change-Id: Iab2c277102b7a774eaa909c9663211694554c5a5
Reviewed-on: https://skia-review.googlesource.com/c/180700
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
5 files changed