| 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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 | 356 |
| 357 CachedMetadata* Resource::cachedMetadata(unsigned dataTypeID) const | 357 CachedMetadata* Resource::cachedMetadata(unsigned dataTypeID) const |
| 358 { | 358 { |
| 359 if (!m_cachedMetadata || m_cachedMetadata->dataTypeID() != dataTypeID) | 359 if (!m_cachedMetadata || m_cachedMetadata->dataTypeID() != dataTypeID) |
| 360 return 0; | 360 return 0; |
| 361 return m_cachedMetadata.get(); | 361 return m_cachedMetadata.get(); |
| 362 } | 362 } |
| 363 | 363 |
| 364 void Resource::setCacheLiveResourcePriority(CacheLiveResourcePriority priority) | 364 void Resource::setCacheLiveResourcePriority(CacheLiveResourcePriority priority) |
| 365 { | 365 { |
| 366 if (inCache() && m_inLiveDecodedResourcesList && m_cacheLiveResourcePriority
!= priority) { | 366 if (inCache() && m_inLiveDecodedResourcesList && cacheLiveResourcePriority()
!= static_cast<unsigned>(priority)) { |
| 367 memoryCache()->removeFromLiveDecodedResourcesList(this); | 367 memoryCache()->removeFromLiveDecodedResourcesList(this); |
| 368 m_cacheLiveResourcePriority = priority; | 368 m_cacheLiveResourcePriority = priority; |
| 369 memoryCache()->insertInLiveDecodedResourcesList(this); | 369 memoryCache()->insertInLiveDecodedResourcesList(this); |
| 370 memoryCache()->prune(); | 370 memoryCache()->prune(); |
| 371 } | 371 } |
| 372 } | 372 } |
| 373 | 373 |
| 374 void Resource::clearLoader() | 374 void Resource::clearLoader() |
| 375 { | 375 { |
| 376 m_loader = 0; | 376 m_loader = 0; |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 921 return "Shader"; | 921 return "Shader"; |
| 922 case Resource::ImportResource: | 922 case Resource::ImportResource: |
| 923 return "ImportResource"; | 923 return "ImportResource"; |
| 924 } | 924 } |
| 925 ASSERT_NOT_REACHED(); | 925 ASSERT_NOT_REACHED(); |
| 926 return "Unknown"; | 926 return "Unknown"; |
| 927 } | 927 } |
| 928 #endif // !LOG_DISABLED | 928 #endif // !LOG_DISABLED |
| 929 | 929 |
| 930 } | 930 } |
| OLD | NEW |