mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
fonts: Add MallocSizeOf
implementation for FontContext
(#32206)
* fonts: Add `MallocSizeOf` implementation for `FontContext` Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com> * android: remove unused imports in font_list.rs Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> --------- Signed-off-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
parent
160c7c0b0f
commit
1c9120c293
13 changed files with 119 additions and 25 deletions
|
@ -425,7 +425,7 @@ impl Layout for LayoutThread {
|
|||
// malloc_enclosing_size_of function.
|
||||
let mut ops = MallocSizeOfOps::new(servo_allocator::usable_size, None, None);
|
||||
|
||||
// FIXME(njn): Just measuring the display tree for now.
|
||||
// TODO: Measure more than just display list, stylist, and font context.
|
||||
let formatted_url = &format!("url({})", self.url);
|
||||
reports.push(Report {
|
||||
path: path![formatted_url, "layout-thread", "display-list"],
|
||||
|
@ -438,6 +438,12 @@ impl Layout for LayoutThread {
|
|||
kind: ReportKind::ExplicitJemallocHeapSize,
|
||||
size: self.stylist.size_of(&mut ops),
|
||||
});
|
||||
|
||||
reports.push(Report {
|
||||
path: path![formatted_url, "layout-thread", "font-context"],
|
||||
kind: ReportKind::ExplicitJemallocHeapSize,
|
||||
size: self.font_context.size_of(&mut ops),
|
||||
});
|
||||
}
|
||||
|
||||
fn set_quirks_mode(&mut self, quirks_mode: QuirksMode) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue