Skip to content
Permalink
Browse files
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):



Canonical link: https://commits.webkit.org/30511@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@38293 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
sundiamonde committed Nov 11, 2008
1 parent 09229b4 commit 1511b194f908006db917a958758a94f7cee76c8a
Showing 3 changed files with 19 additions and 8 deletions.
@@ -1,3 +1,15 @@
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):

2008-11-10 Adam Roben <aroben@apple.com>

Fix Bug 22161: Assertion failure in RenderThemeWin::systemColor when
@@ -320,7 +320,7 @@ void Cache::pruneDeadResources()
// First flush all the decoded data in this queue.
while (current) {
CachedResource* prev = current->m_prevInAllResourcesList;
if (!current->hasClients() && !current->isPreloaded() && current->isLoaded() && current->decodedSize()) {
if (!current->hasClients() && !current->isPreloaded() && current->isLoaded()) {
// Destroy our decoded data. This will remove us from
// m_liveDecodedResources, and possibly move us to a differnt
// LRU list in m_allResources.
@@ -99,14 +99,13 @@ void BitmapImage::destroyDecodedData(bool incremental, bool preserveNearbyFrames
if (imageObserver())
imageObserver()->decodedSizeChanged(this, sizeChange);
}

if (!incremental) {
// Reset the image source, since Image I/O has an underlying cache that it uses
// while animating that it seems to never clear.
m_source.clear();
m_source.setData(m_data.get(), m_allDataReceived);
}
}
if (!incremental) {
// Reset the image source, since Image I/O has an underlying cache that it uses
// while animating that it seems to never clear.
m_source.clear();
m_source.setData(m_data.get(), m_allDataReceived);
}
}

void BitmapImage::cacheFrame(size_t index)

0 comments on commit 1511b19

Please sign in to comment.