Add a new GrResourceCache purging mechanism for purging unused resources.

The client may call GrContext::purgeResourceNotUsedSince() with a stead_clock::time_point and all resources that have been purgeable since before that time point are purged.

This is intended to replace the "max unused flushes" purging mechanism once Chrome adopts it.

Change-Id: I28881dd2959cc01c0acca81b2d6001ee5626439d
Reviewed-on: https://skia-review.googlesource.com/8920
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Eric Karl <ericrk@google.com>
7 files changed