roo_display
API Documentation for roo_display
Loading...
Searching...
No Matches
roo_display::BackgroundFillOptimizer::FrameBuffer Class Reference

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::NibbleRectmask () 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
 

Detailed Description

Backing buffer for the optimizer state.

Definition at line 62 of file background_fill_optimizer.h.

Constructor & Destructor Documentation

◆ FrameBuffer() [1/2]

roo_display::BackgroundFillOptimizer::FrameBuffer::FrameBuffer ( int16_t  width,
int16_t  height 
)

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().

◆ FrameBuffer() [2/2]

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.

Member Function Documentation

◆ invalidate()

void roo_display::BackgroundFillOptimizer::FrameBuffer::invalidate ( )

Clear the entire background mask.

Definition at line 72 of file background_fill_optimizer.cpp.

Referenced by FrameBuffer().

◆ invalidateRect()

void roo_display::BackgroundFillOptimizer::FrameBuffer::invalidateRect ( const Box rect)

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.

◆ mask()

const internal::NibbleRect & roo_display::BackgroundFillOptimizer::FrameBuffer::mask ( ) const
inline

Accessor for testing: retrieve the internal nibble mask.

Definition at line 95 of file background_fill_optimizer.h.

◆ setSwapXY()

void roo_display::BackgroundFillOptimizer::FrameBuffer::setSwapXY ( bool  swap)

◆ SizeForDimensions()

static constexpr size_t roo_display::BackgroundFillOptimizer::FrameBuffer::SizeForDimensions ( int16_t  w,
int16_t  h 
)
inlinestaticconstexpr

Return buffer size in bytes for a given device size.

Parameters
wDevice width in pixels.
hDevice height in pixels.
Returns
Required backing buffer size in bytes.

Definition at line 69 of file background_fill_optimizer.h.

References roo_display::BackgroundFillOptimizer::kBlock.

Friends And Related Symbol Documentation

◆ BackgroundFillOptimizer

◆ BackgroundFillOptimizerDevice


The documentation for this class was generated from the following files: