diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-02-17 09:41:26 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-02-17 09:41:26 +0100 |
commit | c81b217fa784e3976d0635fba384fb86d5cbb10f (patch) | |
tree | 0968b42332b759e38ea0f71c9baaaf288dbdb52d /SharedGraphics/GraphicsBitmap.cpp | |
parent | df2d46d5dcbf2e36253dc9052a73501f0e3555d1 (diff) | |
download | serenity-c81b217fa784e3976d0635fba384fb86d5cbb10f.zip |
SharedGraphics: Assign a human-friendly name for mmapped GraphicsBitmap.
Diffstat (limited to 'SharedGraphics/GraphicsBitmap.cpp')
-rw-r--r-- | SharedGraphics/GraphicsBitmap.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/SharedGraphics/GraphicsBitmap.cpp b/SharedGraphics/GraphicsBitmap.cpp index 74ad96672c..e689550897 100644 --- a/SharedGraphics/GraphicsBitmap.cpp +++ b/SharedGraphics/GraphicsBitmap.cpp @@ -14,8 +14,10 @@ GraphicsBitmap::GraphicsBitmap(const Size& size) : m_size(size) , m_pitch(size.width() * sizeof(RGBA32)) { - m_data = (RGBA32*)mmap(nullptr, size.area() * sizeof(RGBA32), PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, 0, 0); + size_t size_in_bytes = size.area() * sizeof(RGBA32); + m_data = (RGBA32*)mmap(nullptr, size_in_bytes, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, 0, 0); ASSERT(m_data && m_data != (void*)-1); + set_mmap_name(m_data, size_in_bytes, String::format("GraphicsBitmap [%dx%d]", width(), height()).characters()); m_mmaped = true; } |