Changeset 38293

Show
Ignore:
Timestamp:
11/10/08 23:06:41 (16 months ago)
Author:
slewis@apple.com
Message:

2008-11-10 Stephanie Lewis < slewis@apple.com>

Reviewed by Dan Bernstein.

Clear the image source cache even if we haven't decoded any of the image data.
We use the image source cache when calculating layout.

  • loader/Cache.cpp: (WebCore::Cache::pruneDeadResources):
  • platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::destroyDecodedData):
Location:
trunk/WebCore
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r38274 r38293  
     12008-11-10  Stephanie Lewis  <slewis@apple.com> 
     2 
     3        Reviewed by Dan Bernstein. 
     4 
     5        Clear the image source cache even if we haven't decoded any of the image data. 
     6        We use the image source cache when calculating layout. 
     7 
     8        * loader/Cache.cpp: 
     9        (WebCore::Cache::pruneDeadResources): 
     10        * platform/graphics/BitmapImage.cpp: 
     11        (WebCore::BitmapImage::destroyDecodedData): 
     12 
    1132008-11-10  Adam Roben  <aroben@apple.com> 
    214 
  • trunk/WebCore/loader/Cache.cpp

    r38165 r38293  
    321321        while (current) { 
    322322            CachedResource* prev = current->m_prevInAllResourcesList; 
    323             if (!current->hasClients() && !current->isPreloaded() && current->isLoaded() && current->decodedSize()) { 
     323            if (!current->hasClients() && !current->isPreloaded() && current->isLoaded()) { 
    324324                // Destroy our decoded data. This will remove us from  
    325325                // m_liveDecodedResources, and possibly move us to a differnt  
  • trunk/WebCore/platform/graphics/BitmapImage.cpp

    r37612 r38293  
    100100                imageObserver()->decodedSizeChanged(this, sizeChange); 
    101101        } 
    102          
    103         if (!incremental) { 
    104             // Reset the image source, since Image I/O has an underlying cache that it uses 
    105             // while animating that it seems to never clear. 
    106             m_source.clear(); 
    107             m_source.setData(m_data.get(), m_allDataReceived); 
    108         } 
    109     } 
     102    } 
     103    if (!incremental) { 
     104        // Reset the image source, since Image I/O has an underlying cache that it uses 
     105        // while animating that it seems to never clear. 
     106        m_source.clear(); 
     107        m_source.setData(m_data.get(), m_allDataReceived); 
     108    }     
    110109} 
    111110