#include <dl_storage.h>
Public Member Functions | |
| DisplayListStorage ()=default | |
| DisplayListStorage (DisplayListStorage &&) | |
| uint8_t * | base () |
| Returns a pointer to the base of the storage. | |
| const uint8_t * | base () const |
| size_t | size () const |
| Returns the currently allocated size. | |
| size_t | capacity () const |
| Returns the maximum currently allocated space. | |
| uint8_t * | allocate (size_t needed) |
| void | trim () |
| void | reset () |
| Resets the storage and allocation of the object to an empty state. | |
| DisplayListStorage & | operator= (DisplayListStorage &&other) |
Static Public Member Functions | |
| static size_t | NextPowerOfTwoSize (size_t x) |
| Compute the next power of two from [x]. | |
Static Public Attributes | |
| static const constexpr size_t | kDLPageSize = 4096u |
Definition at line 15 of file dl_storage.h.
|
default |
| flutter::DisplayListStorage::DisplayListStorage | ( | DisplayListStorage && | source | ) |
Definition at line 60 of file dl_storage.cc.
| uint8_t * flutter::DisplayListStorage::allocate | ( | size_t | needed | ) |
Ensures the indicated number of bytes are available and returns a pointer to that memory within the storage while also invalidating any other outstanding pointers into the storage.
Definition at line 39 of file dl_storage.cc.
References FML_CHECK, flutter::is_power_of_two(), kDLPageSize, and NextPowerOfTwoSize().
Referenced by flutter::testing::TEST(), and flutter::testing::TEST().
|
inline |
Returns a pointer to the base of the storage.
Definition at line 23 of file dl_storage.h.
Referenced by flutter::CompareOps(), flutter::DisplayList::Dispatch(), flutter::DisplayList::Dispatch(), flutter::DisplayList::Dispatch(), flutter::DisplayList::Equals(), flutter::DisplayList::GetOpType(), flutter::DisplayListBuilder::Restore(), flutter::testing::TEST(), flutter::testing::TEST(), and flutter::testing::TEST().
|
inline |
Definition at line 24 of file dl_storage.h.
|
inline |
Returns the maximum currently allocated space.
Definition at line 30 of file dl_storage.h.
Referenced by flutter::testing::TEST(), flutter::testing::TEST(), and flutter::testing::TEST().
|
static |
Compute the next power of two from [x].
Definition at line 14 of file dl_storage.cc.
References x.
Referenced by allocate(), and flutter::testing::TEST().
| DisplayListStorage & flutter::DisplayListStorage::operator= | ( | DisplayListStorage && | other | ) |
Definition at line 74 of file dl_storage.cc.
| void flutter::DisplayListStorage::reset | ( | ) |
Resets the storage and allocation of the object to an empty state.
Definition at line 68 of file dl_storage.cc.
|
inline |
Returns the currently allocated size.
Definition at line 27 of file dl_storage.h.
Referenced by flutter::DisplayList::bytes(), flutter::CompareOps(), flutter::DisplayList::Dispatch(), flutter::DisplayList::DisplayList(), flutter::DisplayList::Equals(), flutter::DisplayList::GetOpType(), flutter::testing::TEST(), flutter::testing::TEST(), and flutter::testing::TEST().
|
inline |
Trims the storage to the currently allocated size and invalidates any outstanding pointers into the storage.
Definition at line 39 of file dl_storage.h.
Referenced by flutter::DisplayListBuilder::Build().
|
staticconstexpr |
Definition at line 17 of file dl_storage.h.
Referenced by allocate(), flutter::testing::TEST(), and flutter::testing::TEST().