We only unparent tiles that are in the VisibleTileCohort when cleaning up no-longer-visible tiles. If tiles were created via prepopulateRect() and never made it into the VisibleTileCohort, they won't be unparented (and will thus stick around, nonvolatile, forever, until the scale changes or the primary coverage rect moves to intersect them). This is in some cases a huge waste of memory and time.
We can't just immediately unparent all non-primary-coverage layers, because that would defeat prepopulateRect(). We may be able to make use of the cohort age and unparent them on a subsequent revalidateTiles (and schedule a revalidation timer when we prepopulate, etc.).
Created attachment 232419 [details]
Attachment 232419 [details] did not pass style-queue:
ERROR: Source/WebCore/platform/graphics/ca/mac/TileGrid.h:125: The parameter name "cohortInfo" adds no information, so it should be removed. [readability/parameter_name] 
Total errors found: 1 in 4 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 232419 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=232419&action=review
> + double timeUntilCohortExpires(TileCohortInfo cohortInfo); // move onto cohortinfo?
const TileCohortInfo&. Could be static or moved onto TileCohortInfo.
> > Source/WebCore/platform/graphics/ca/mac/TileGrid.h:125
> > + double timeUntilCohortExpires(TileCohortInfo cohortInfo); // move onto cohortinfo?
> const TileCohortInfo&. Could be static or moved onto TileCohortInfo.
I totally meant to actually do what that comment said, and forgot. Fixed in the patch that landed. Thanks!