• mdjones's avatar
    Remove title resources when they are no longer used · e69847f7
    mdjones authored
    Previously, layer titles found their way into the resource manager
    as ANDROID_RESOURCE_TYPE_DYNAMIC_BITMAP and were left there forever.
    Over time, these recources accumulated (easily reproducable by
    entering and exiting the tab switcher) and is more than likely the
    cause of memory related crashes when entering the tab switcher.
    The title layer itself was removed from the LayerTitleCache but the
    resources that constitute the title were never correctly managed.
    
    This change adds a function to the ResourceManager that allows the
    LayerTitleCache to remove associated resources. Specifically, only
    dynamic bitmaps can be manually removed.
    
    BUG=669348
    
    Review-Url: https://codereview.chromium.org/2578233002
    Cr-Commit-Position: refs/heads/master@{#441773}
    e69847f7
resource_manager_impl.h 4.69 KB