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

Side by Side Diff: third_party/WebKit/Source/core/fetch/FontResource.cpp

Issue 2533503002: Report decoded webfont blob size to memory-infra (Closed)
Patch Set: Created 4 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Torch Mobile, Inc. 3 * Copyright (C) 2009 Torch Mobile, Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 DCHECK(!isLoaded()); 183 DCHECK(!isLoaded());
184 ResourceClientWalker<FontResourceClient> walker(clients()); 184 ResourceClientWalker<FontResourceClient> walker(clients());
185 while (FontResourceClient* client = walker.next()) { 185 while (FontResourceClient* client = walker.next()) {
186 if (!client->isLowPriorityLoadingAllowedForRemoteFont()) { 186 if (!client->isLowPriorityLoadingAllowedForRemoteFont()) {
187 return false; 187 return false;
188 } 188 }
189 } 189 }
190 return true; 190 return true;
191 } 191 }
192 192
193 void FontResource::onMemoryDump(WebMemoryDumpLevelOfDetail level,
194 WebProcessMemoryDump* memoryDump) const {
195 Resource::onMemoryDump(level, memoryDump);
196 if (!m_fontData)
197 return;
198 const String name = getMemoryDumpName() + "/decoded_webfont";
199 WebMemoryAllocatorDump* dump = memoryDump->createMemoryAllocatorDump(name);
200 dump->addScalar("size", "bytes", m_fontData->dataSize());
201 memoryDump->addSuballocation(dump->guid(), "malloc");
202 }
203
193 } // namespace blink 204 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/FontResource.h ('k') | third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698