| OLD | NEW |
| 1 /* | 1 /* |
| 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
| 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) | 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) |
| 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) | 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) |
| 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. | 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. |
| 7 | 7 |
| 8 This library is free software; you can redistribute it and/or | 8 This library is free software; you can redistribute it and/or |
| 9 modify it under the terms of the GNU Library General Public | 9 modify it under the terms of the GNU Library General Public |
| 10 License as published by the Free Software Foundation; either | 10 License as published by the Free Software Foundation; either |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 , m_preloadResult(PreloadNotReferenced) | 109 , m_preloadResult(PreloadNotReferenced) |
| 110 , m_cacheLiveResourcePriority(CacheLiveResourcePriorityLow) | 110 , m_cacheLiveResourcePriority(CacheLiveResourcePriorityLow) |
| 111 , m_inLiveDecodedResourcesList(false) | 111 , m_inLiveDecodedResourcesList(false) |
| 112 , m_requestedFromNetworkingLayer(false) | 112 , m_requestedFromNetworkingLayer(false) |
| 113 , m_inCache(false) | 113 , m_inCache(false) |
| 114 , m_loading(false) | 114 , m_loading(false) |
| 115 , m_switchingClientsToRevalidatedResource(false) | 115 , m_switchingClientsToRevalidatedResource(false) |
| 116 , m_type(type) | 116 , m_type(type) |
| 117 , m_status(Pending) | 117 , m_status(Pending) |
| 118 , m_wasPurged(false) | 118 , m_wasPurged(false) |
| 119 , m_needsSynchronousCacheHit(false) |
| 119 #ifndef NDEBUG | 120 #ifndef NDEBUG |
| 120 , m_deleted(false) | 121 , m_deleted(false) |
| 121 , m_lruIndex(0) | 122 , m_lruIndex(0) |
| 122 #endif | 123 #endif |
| 123 , m_nextInAllResourcesList(0) | 124 , m_nextInAllResourcesList(0) |
| 124 , m_prevInAllResourcesList(0) | 125 , m_prevInAllResourcesList(0) |
| 125 , m_nextInLiveResourcesList(0) | 126 , m_nextInLiveResourcesList(0) |
| 126 , m_prevInLiveResourcesList(0) | 127 , m_prevInLiveResourcesList(0) |
| 127 , m_resourceToRevalidate(0) | 128 , m_resourceToRevalidate(0) |
| 128 , m_proxyResource(0) | 129 , m_proxyResource(0) |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 m_preloadResult = PreloadReferencedWhileComplete; | 426 m_preloadResult = PreloadReferencedWhileComplete; |
| 426 else if (m_requestedFromNetworkingLayer) | 427 else if (m_requestedFromNetworkingLayer) |
| 427 m_preloadResult = PreloadReferencedWhileLoading; | 428 m_preloadResult = PreloadReferencedWhileLoading; |
| 428 else | 429 else |
| 429 m_preloadResult = PreloadReferenced; | 430 m_preloadResult = PreloadReferenced; |
| 430 } | 431 } |
| 431 if (!hasClients() && inCache()) | 432 if (!hasClients() && inCache()) |
| 432 memoryCache()->addToLiveResourcesSize(this); | 433 memoryCache()->addToLiveResourcesSize(this); |
| 433 | 434 |
| 434 // If we have existing data to send to the new client and the resource type
supprts it, send it asynchronously. | 435 // If we have existing data to send to the new client and the resource type
supprts it, send it asynchronously. |
| 435 if (!m_response.isNull() && !m_proxyResource && !shouldSendCachedDataSynchro
nouslyForType(type())) { | 436 if (!m_response.isNull() && !m_proxyResource && !shouldSendCachedDataSynchro
nouslyForType(type()) && !m_needsSynchronousCacheHit) { |
| 436 m_clientsAwaitingCallback.add(client); | 437 m_clientsAwaitingCallback.add(client); |
| 437 ResourceCallback::callbackHandler()->schedule(this); | 438 ResourceCallback::callbackHandler()->schedule(this); |
| 438 return false; | 439 return false; |
| 439 } | 440 } |
| 440 | 441 |
| 441 m_clients.add(client); | 442 m_clients.add(client); |
| 442 return true; | 443 return true; |
| 443 } | 444 } |
| 444 | 445 |
| 445 void Resource::removeClient(ResourceClient* client) | 446 void Resource::removeClient(ResourceClient* client) |
| (...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 918 return "Shader"; | 919 return "Shader"; |
| 919 case Resource::ImportResource: | 920 case Resource::ImportResource: |
| 920 return "ImportResource"; | 921 return "ImportResource"; |
| 921 } | 922 } |
| 922 ASSERT_NOT_REACHED(); | 923 ASSERT_NOT_REACHED(); |
| 923 return "Unknown"; | 924 return "Unknown"; |
| 924 } | 925 } |
| 925 #endif // !LOG_DISABLED | 926 #endif // !LOG_DISABLED |
| 926 | 927 |
| 927 } | 928 } |
| OLD | NEW |