|
roo_display
API Documentation for roo_display
|
Backing buffer for the optimizer state. More...
#include <background_fill_optimizer.h>
Public Member Functions | |
| FrameBuffer (int16_t width, int16_t height) | |
| Create a frame buffer with dynamic allocation. | |
| FrameBuffer (int16_t width, int16_t height, roo::byte *buffer) | |
| Create a frame buffer using caller-provided storage. | |
| void | invalidate () |
| Clear the entire background mask. | |
| void | setSwapXY (bool swap) |
| Set whether the underlying display swaps x/y. | |
| void | invalidateRect (const Box &rect) |
Clear the mask for the area covering rect. | |
| const internal::NibbleRect & | mask () const |
| Accessor for testing: retrieve the internal nibble mask. | |
Static Public Member Functions | |
| static constexpr size_t | SizeForDimensions (int16_t w, int16_t h) |
| Return buffer size in bytes for a given device size. | |
Friends | |
| class | BackgroundFillOptimizer |
| class | BackgroundFillOptimizerDevice |
Backing buffer for the optimizer state.
Definition at line 62 of file background_fill_optimizer.h.
Create a frame buffer with dynamic allocation.
Buffer is zero-initialized. Call setPalette() before use.
Definition at line 26 of file background_fill_optimizer.cpp.
References invalidate().
| roo_display::BackgroundFillOptimizer::FrameBuffer::FrameBuffer | ( | int16_t | width, |
| int16_t | height, | ||
| roo::byte * | buffer | ||
| ) |
Create a frame buffer using caller-provided storage.
The buffer is not cleared. It must be large enough for the device dimensions (see SizeForDimensions()). Call setPalette() before use.
Definition at line 33 of file background_fill_optimizer.cpp.
| void roo_display::BackgroundFillOptimizer::FrameBuffer::invalidate | ( | ) |
Clear the entire background mask.
Definition at line 72 of file background_fill_optimizer.cpp.
Referenced by FrameBuffer().
Clear the mask for the area covering rect.
Definition at line 80 of file background_fill_optimizer.cpp.
References roo_display::internal::NibbleRect::fillRect(), and roo_display::BackgroundFillOptimizer::kBlock.
|
inline |
Accessor for testing: retrieve the internal nibble mask.
Definition at line 95 of file background_fill_optimizer.h.
Set whether the underlying display swaps x/y.
Definition at line 86 of file background_fill_optimizer.cpp.
References roo_display::internal::NibbleRect::buffer(), roo_display::internal::NibbleRect::height(), and roo_display::internal::NibbleRect::width().
Referenced by roo_display::BackgroundFillOptimizerDevice::orientationUpdated().
|
inlinestaticconstexpr |
Return buffer size in bytes for a given device size.
| w | Device width in pixels. |
| h | Device height in pixels. |
Definition at line 69 of file background_fill_optimizer.h.
References roo_display::BackgroundFillOptimizer::kBlock.
|
friend |
Definition at line 98 of file background_fill_optimizer.h.
Definition at line 99 of file background_fill_optimizer.h.