summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/Source/platform/fonts/FontCacheMemoryDumpProvider.cpp
blob: 9b439915bc9cdbcf91cfd3d70e3829560f211566 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "platform/fonts/FontCacheMemoryDumpProvider.h"

#include "platform/fonts/FontCache.h"
#include "wtf/Assertions.h"
#include "wtf/MainThread.h"

namespace blink {

FontCacheMemoryDumpProvider* FontCacheMemoryDumpProvider::instance()
{
    DEFINE_STATIC_LOCAL(FontCacheMemoryDumpProvider, instance, ());
    return &instance;
}

bool FontCacheMemoryDumpProvider::onMemoryDump(WebMemoryDumpLevelOfDetail levelOfDetail, WebProcessMemoryDump* memoryDump)
{
    ASSERT(isMainThread());
    FontCache::fontCache()->dumpFontPlatformDataCache(memoryDump);
    FontCache::fontCache()->dumpShapeResultCache(memoryDump);
    return true;
}

} // namespace blink