| 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 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 741 } | 741 } |
| 742 | 742 |
| 743 void Resource::revalidationFailed() | 743 void Resource::revalidationFailed() |
| 744 { | 744 { |
| 745 ASSERT(WTF::isMainThread()); | 745 ASSERT(WTF::isMainThread()); |
| 746 WTF_LOG(ResourceLoading, "Revalidation failed for %p", this); | 746 WTF_LOG(ResourceLoading, "Revalidation failed for %p", this); |
| 747 ASSERT(resourceToRevalidate()); | 747 ASSERT(resourceToRevalidate()); |
| 748 clearResourceToRevalidate(); | 748 clearResourceToRevalidate(); |
| 749 } | 749 } |
| 750 | 750 |
| 751 bool Resource::hasOneHandle() const |
| 752 { |
| 753 return m_handleCount == 1 || (memoryCache()->contains(this) && m_handleCount
== 2); |
| 754 } |
| 755 |
| 751 void Resource::registerHandle(ResourcePtrBase* h) | 756 void Resource::registerHandle(ResourcePtrBase* h) |
| 752 { | 757 { |
| 753 assertAlive(); | 758 assertAlive(); |
| 754 ++m_handleCount; | 759 ++m_handleCount; |
| 755 if (m_resourceToRevalidate) | 760 if (m_resourceToRevalidate) |
| 756 m_handlesToRevalidate.add(h); | 761 m_handlesToRevalidate.add(h); |
| 757 } | 762 } |
| 758 | 763 |
| 759 void Resource::unregisterHandle(ResourcePtrBase* h) | 764 void Resource::unregisterHandle(ResourcePtrBase* h) |
| 760 { | 765 { |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 974 return "Shader"; | 979 return "Shader"; |
| 975 case Resource::ImportResource: | 980 case Resource::ImportResource: |
| 976 return "ImportResource"; | 981 return "ImportResource"; |
| 977 } | 982 } |
| 978 ASSERT_NOT_REACHED(); | 983 ASSERT_NOT_REACHED(); |
| 979 return "Unknown"; | 984 return "Unknown"; |
| 980 } | 985 } |
| 981 #endif // !LOG_DISABLED | 986 #endif // !LOG_DISABLED |
| 982 | 987 |
| 983 } | 988 } |
| OLD | NEW |