• ericrk's avatar
    Idle cleanup for worker context · 051ae83b
    ericrk authored
    Currently, Skia flushes unused items out of its caches after ~1 second
    of non-use (50 flushes). This works fine while Skia is in-use, but when
    a worker context goes idle we stop calling into Skia altogether. This
    means that Skia will never flush out unused cache items from the last
    piece of work it did. This can lead to some rather large temporaries
    being kept around (~20mb).
    
    This change adds an idle cleanup process which flushes Skia's caches
    and cleans up worker context resources after a worker context is idle
    for 1 second.
    
    BUG=624630
    CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel
    
    Review-Url: https://codereview.chromium.org/2353033003
    Cr-Commit-Position: refs/heads/master@{#420496}
    051ae83b
context_provider.cc 915 Bytes