For GPU raster the ContextCacheController in the renderer process purges GPU resources held by the GrContext with 2 strategies:
1) Visibility: It keeps a count of visible clients (compositors) using a Context and once there are no visible clients, the cache is purged.
2) Busy notifications: Whenever the context lock is acquired, the context is marked busy and a task with a 1 second delay is posted to purge the cache. The aim is to use a second of inactivity as an indicator for idle period and purge the cache once a context becomes idle.
Since we're moving towards sharing a single context across renderers in the GPU, per renderer visibility for cache clearing doesn't make sense anymore. We should probably purge this cache when the app becomes invisible/backgrounded though.
Also analogous to the busy notification logic, we should probably purge this cache in the GPU after a period of inactivity from any raster decoder that supports OOP raster. ericrk@, did I miss any detail here?
Comment 1 by khushals...@chromium.org
, Jul 2Status: Assigned (was: Available)