Example #1
0
void ImageLoader::sourceImageChanged()
{
    ImageLoaderClientSet::iterator end = m_clients.end();
    for (ImageLoaderClientSet::iterator it = m_clients.begin(); it != end; ++it) {
        ImageLoaderClient* handle = *it;
        handle->notifyImageSourceChanged();
    }
}
void ImageLoader::sourceImageChanged()
{
#if ENABLE(OILPAN)
    for (auto& client : m_clients)
        client.key->notifyImageSourceChanged();
#else
    for (auto& client : m_clients) {
        ImageLoaderClient* handle = client;
        handle->notifyImageSourceChanged();
    }
#endif
}
void ImageLoader::willRemoveClient(ImageLoaderClient& client)
{
    if (client.requestsHighLiveResourceCachePriority()) {
        ASSERT(m_highPriorityClientCount);
        m_highPriorityClientCount--;
        if (m_image && !m_highPriorityClientCount)
            memoryCache()->updateDecodedResource(m_image.get(), UpdateForPropertyChange, MemoryCacheLiveResourcePriorityLow);
    }
}