mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:47:35 +00:00
Revert "BitmapView: Disable mutations of the underlying Bitmap"
This reverts commit f25209113f
.
This commit is contained in:
parent
c1e292e5bc
commit
bebbeda726
3 changed files with 97 additions and 82 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Bitmap.h>
|
||||
#include <AK/BitmapView.h>
|
||||
#include <AK/ScopeGuard.h>
|
||||
#include <AK/TemporaryChange.h>
|
||||
#include <AK/Vector.h>
|
||||
|
@ -32,7 +32,7 @@ public:
|
|||
Heap(u8* memory, size_t memory_size)
|
||||
: m_total_chunks(calculate_chunks(memory_size))
|
||||
, m_chunks(memory)
|
||||
, m_bitmap(m_total_chunks, false)
|
||||
, m_bitmap(memory + m_total_chunks * CHUNK_SIZE, m_total_chunks)
|
||||
{
|
||||
// To keep the alignment of the memory passed in, place the bitmap
|
||||
// at the end of the memory block.
|
||||
|
@ -153,7 +153,7 @@ private:
|
|||
size_t m_total_chunks { 0 };
|
||||
size_t m_allocated_chunks { 0 };
|
||||
u8* m_chunks { nullptr };
|
||||
Bitmap m_bitmap;
|
||||
BitmapView m_bitmap;
|
||||
};
|
||||
|
||||
template<typename ExpandHeap>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue