Repository navigation
canvas: report malloc sizeof vello_cpu - #46958
Merged
Merged
Conversation
Signed-off-by: Asset Malik <5373400+janeoa@users.noreply.github.com>
Signed-off-by: Asset Malik <5373400+janeoa@users.noreply.github.com>
Narfinger
reviewed
Aug 3, 2026
Narfinger
left a comment
Contributor
There was a problem hiding this comment.
This looks ok to me but I am not that familiar with canvas and reporting.
mrobinson
previously requested changes
Aug 4, 2026
mrobinson
left a comment
Member
There was a problem hiding this comment.
Looks good. I have a few nits:
Signed-off-by: Asset Malik <5373400+janeoa@users.noreply.github.com>
Contributor
Author
Thanks for the review! Applied the requested changes. |
sagudev
reviewed
Aug 4, 2026
Signed-off-by: Asset Malik <5373400+janeoa@users.noreply.github.com>
Signed-off-by: Asset Malik <5373400+janeoa@users.noreply.github.com>
sagudev
approved these changes
Aug 5, 2026
sagudev
enabled auto-merge
August 5, 2026 09:13
Contributor
Author
|
@mrobinson, can you please take a second look at the PR? It seem to need your approval? |
jdm
approved these changes
Aug 6, 2026
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
mrobinson
approved these changes
Aug 6, 2026
RichardTjokroutomo
pushed a commit
to RichardTjokroutomo/servo
that referenced
this pull request
Oct 6, 2026
I've added the `malloc_size_of` as a dependancy, so that we `impl
MallocSizeOf for vello_cpu::Pixmap`
Added a `memory_report` to the canvas.
As we have two backends (vello and vello_cpu), I did one common
`CanvasStoreSizesPerType` to report them in the `backend.rs`.
Added `mem_profiler_chan.clone()` to the constellation.
Vello_cpu does have a nice
```rust
/// Returns a reference to the underlying data as premultiplied RGBA8.
///
/// The pixels are in row-major order.
pub fn data(&self) -> &[PremulRgba8] {
&self.buf
}
```
to hook into. But for the Vello I have left a `TODO` instead and report
0.
<img width="416" height="301" alt="image"
src="https://github.com/user-attachments/assets/05cca5af-1957-4a21-a67e-84b77a2677b1"
/>
Testing: I have no auto tests, but I did spawn some canvases and saw
them being reported.
Fixes: servo#46785
---------
Signed-off-by: Asset Malik <5373400+janeoa@users.noreply.github.com>
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've added the
malloc_size_ofas a dependancy, so that weimpl MallocSizeOf for vello_cpu::PixmapAdded a
memory_reportto the canvas.As we have two backends (vello and vello_cpu), I did one common
CanvasStoreSizesPerTypeto report them in thebackend.rs.Added
mem_profiler_chan.clone()to the constellation.Vello_cpu does have a nice
to hook into. But for the Vello I have left a
TODOinstead and report 0.Testing: I have no auto tests, but I did spawn some canvases and saw them being reported.
Fixes: #46785