Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: Source/core/loader/cache/CachedResource.cpp

Issue 19393004: Allow eviction of ImageBitmaps that are created from ImageElements. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 } 98 }
99 for (size_t i = 0; i < WTF_ARRAY_LENGTH(headerPrefixesToIgnoreAfterRevalidat ion); i++) { 99 for (size_t i = 0; i < WTF_ARRAY_LENGTH(headerPrefixesToIgnoreAfterRevalidat ion); i++) {
100 if (header.startsWith(headerPrefixesToIgnoreAfterRevalidation[i])) 100 if (header.startsWith(headerPrefixesToIgnoreAfterRevalidation[i]))
101 return false; 101 return false;
102 } 102 }
103 return true; 103 return true;
104 } 104 }
105 105
106 DEFINE_DEBUG_ONLY_GLOBAL(RefCountedLeakCounter, cachedResourceLeakCounter, ("Cac hedResource")); 106 DEFINE_DEBUG_ONLY_GLOBAL(RefCountedLeakCounter, cachedResourceLeakCounter, ("Cac hedResource"));
107 107
108 CachedResource::CachedResource(const ResourceRequest& request, Type type) 108 CachedResource::CachedResource(const ResourceRequest& request, Type type, Decode CachePriority decodeCachePriority)
Justin Novosad 2013/07/19 21:09:53 No need for extra construction arg. Just initializ
109 : m_resourceRequest(request) 109 : m_resourceRequest(request)
110 , m_responseTimestamp(currentTime()) 110 , m_responseTimestamp(currentTime())
111 , m_decodedDataDeletionTimer(this, &CachedResource::decodedDataDeletionTimer Fired) 111 , m_decodedDataDeletionTimer(this, &CachedResource::decodedDataDeletionTimer Fired)
112 , m_cancelTimer(this, &CachedResource::cancelTimerFired) 112 , m_cancelTimer(this, &CachedResource::cancelTimerFired)
113 , m_lastDecodedAccessTime(0) 113 , m_lastDecodedAccessTime(0)
114 , m_loadFinishTime(0) 114 , m_loadFinishTime(0)
115 , m_identifier(0) 115 , m_identifier(0)
116 , m_encodedSize(0) 116 , m_encodedSize(0)
117 , m_decodedSize(0) 117 , m_decodedSize(0)
118 , m_accessCount(0) 118 , m_accessCount(0)
119 , m_handleCount(0) 119 , m_handleCount(0)
120 , m_preloadCount(0) 120 , m_preloadCount(0)
121 , m_preloadResult(PreloadNotReferenced) 121 , m_preloadResult(PreloadNotReferenced)
122 , m_decodeCachePriority(decodeCachePriority)
122 , m_inLiveDecodedResourcesList(false) 123 , m_inLiveDecodedResourcesList(false)
123 , m_requestedFromNetworkingLayer(false) 124 , m_requestedFromNetworkingLayer(false)
124 , m_inCache(false) 125 , m_inCache(false)
125 , m_loading(false) 126 , m_loading(false)
126 , m_switchingClientsToRevalidatedResource(false) 127 , m_switchingClientsToRevalidatedResource(false)
127 , m_type(type) 128 , m_type(type)
128 , m_status(Pending) 129 , m_status(Pending)
129 #ifndef NDEBUG 130 #ifndef NDEBUG
130 , m_deleted(false) 131 , m_deleted(false)
131 , m_lruIndex(0) 132 , m_lruIndex(0)
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 info.addMember(m_proxyResource, "proxyResource"); 875 info.addMember(m_proxyResource, "proxyResource");
875 info.addMember(m_handlesToRevalidate, "handlesToRevalidate"); 876 info.addMember(m_handlesToRevalidate, "handlesToRevalidate");
876 info.addMember(m_options, "options"); 877 info.addMember(m_options, "options");
877 info.addMember(m_decodedDataDeletionTimer, "decodedDataDeletionTimer"); 878 info.addMember(m_decodedDataDeletionTimer, "decodedDataDeletionTimer");
878 info.ignoreMember(m_clientsAwaitingCallback); 879 info.ignoreMember(m_clientsAwaitingCallback);
879 880
880 if (m_purgeableData && !m_purgeableData->wasPurged()) 881 if (m_purgeableData && !m_purgeableData->wasPurged())
881 info.addRawBuffer(m_purgeableData.get(), m_purgeableData->size(), "Purge ableData", "purgeableData"); 882 info.addRawBuffer(m_purgeableData.get(), m_purgeableData->size(), "Purge ableData", "purgeableData");
882 } 883 }
883 } 884 }
885
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698