Skip to content
  • Daniel Garcia Moreno's avatar
    texture-cache: Remove also scaled keys from the cache · 8299368b
    Daniel Garcia Moreno authored and Georges Basile Stavracas Neto's avatar Georges Basile Stavracas Neto committed
    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 hash table was added to keep track of the cached files scales, so
    for a file stored with the key "KEY" we store in the new cache the
    scales of this file that we've in the cache:
    
     * KEY -> [1.000000, 2.000000, ...]
    
    When the KEY is removed from the cache, we can look now in this new hash
    table and for each scale we also remove the key "KEY1.000000",
    "KEY2.000000", etc.
    
    GNOME/gnome-shell!567
    8299368b