2018-05-15 00:47:01 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2019-07-16 10:34:18 +03:00
|
|
|
|
2018-05-15 00:47:01 +03:00
|
|
|
#include "SkMemoryReporter.h"
|
2019-07-16 10:34:18 +03:00
|
|
|
|
2018-05-15 00:47:01 +03:00
|
|
|
#include "skia/include/core/SkGraphics.h"
|
2019-07-16 10:34:18 +03:00
|
|
|
|
2018-05-15 00:47:01 +03:00
|
|
|
namespace mozilla {
|
|
|
|
namespace gfx {
|
2019-07-16 10:34:18 +03:00
|
|
|
|
2018-05-15 00:47:01 +03:00
|
|
|
NS_IMETHODIMP
|
|
|
|
SkMemoryReporter::CollectReports(nsIHandleReportCallback* aHandleReport,
|
|
|
|
nsISupports* aData, bool aAnonymize) {
|
|
|
|
MOZ_COLLECT_REPORT("explicit/skia-font-cache", KIND_HEAP, UNITS_BYTES,
|
|
|
|
SkGraphics::GetFontCacheUsed(),
|
|
|
|
"Memory used in the skia font cache.");
|
|
|
|
return NS_OK;
|
|
|
|
}
|
2019-07-16 10:34:18 +03:00
|
|
|
|
2018-05-15 00:47:01 +03:00
|
|
|
NS_IMPL_ISUPPORTS(SkMemoryReporter, nsIMemoryReporter);
|
2019-07-16 10:34:18 +03:00
|
|
|
|
2018-05-15 00:47:01 +03:00
|
|
|
} // namespace gfx
|
|
|
|
} // namespace mozilla
|