Skip to content
  • Daniel Garcia Moreno's avatar
    texture-cache: Remove also scaled keys from the cache · e642e1c1
    Daniel Garcia Moreno authored
    We're storing in the texture cache images and scaled images appending
    the scaling factor to the key. When a file changes the cache key
    corresponding to that file is removed, but not the keys for the scaled
    ones so that images in the cache are never reloaded.
    
    This patch removes all keys from the cache related to the file that
    changes, including those with the scaling factor.
    
    A new set (hash table) was added to keep track of scale used to be able
    to remove all possible images in the cache.
    
    When the KEY is removed from the cache, we can look now in the scale set
    for and each scale we also remove the key "KEY1.000000", "KEY2.000000",
    etc.
    
    Assuming that the number of used scales is small (I would typically
    expect one or two), the overhead should be negligible.
    
    GNOME/gnome-shell!567
    e642e1c1