Trait libremarkable::framebuffer::FramebufferRefresh
source · pub trait FramebufferRefresh {
fn full_refresh(
&self,
waveform_mode: waveform_mode,
temperature: display_temp,
dither_mode: dither_mode,
quant_bit: i32,
wait_completion: bool
) -> u32;
fn partial_refresh(
&self,
region: &mxcfb_rect,
mode: PartialRefreshMode,
waveform_mode: waveform_mode,
temperature: display_temp,
dither_mode: dither_mode,
quant_bit: i32,
force_full_refresh: bool
) -> u32;
fn wait_refresh_complete(&self, marker: u32) -> u32;
}
Required Methods§
sourcefn full_refresh(
&self,
waveform_mode: waveform_mode,
temperature: display_temp,
dither_mode: dither_mode,
quant_bit: i32,
wait_completion: bool
) -> u32
fn full_refresh(
&self,
waveform_mode: waveform_mode,
temperature: display_temp,
dither_mode: dither_mode,
quant_bit: i32,
wait_completion: bool
) -> u32
Refreshes the entire screen with the provided parameters. If wait_completion
is
set to true, doesn’t return before the refresh has been completed. Returns the marker.
sourcefn partial_refresh(
&self,
region: &mxcfb_rect,
mode: PartialRefreshMode,
waveform_mode: waveform_mode,
temperature: display_temp,
dither_mode: dither_mode,
quant_bit: i32,
force_full_refresh: bool
) -> u32
fn partial_refresh(
&self,
region: &mxcfb_rect,
mode: PartialRefreshMode,
waveform_mode: waveform_mode,
temperature: display_temp,
dither_mode: dither_mode,
quant_bit: i32,
force_full_refresh: bool
) -> u32
Refreshes the given region
with the provided parameters. If mode
is DryRun
or
Wait
, this function won’t return before the DryRun
’s collision_test or
refresh has been completed. In Async
mode, this function will return immediately
and return a marker
which can then later be fed to wait_refresh_complete
to wait
for its completion. In DryRun
, it will return the collision_test
result.
force_full_refresh
allows rare cases where you may want to do a full refresh on a
partial region. 99.9% of of the time, you want this set to false
.
Some additional points to note:
-
PxP must process 8x8 pixel blocks, and all pixels in each block are considered for auto-waveform mode selection. If the update region is not 8x8 aligned, additional unwanted pixels will be considered in auto-waveform mode selection.
-
PxP input must be 32-bit aligned, so any update address not 32-bit aligned must be shifted to meet the 32-bit alignment. The PxP will thus end up processing pixels outside of the update region to satisfy this alignment restriction, which can affect auto-waveform mode selection.
-
If input fails 32-bit alignment, and the resulting expansion of the processed region would add at least 8 pixels more per line than the original update line width, the EPDC would cause screen artifacts by incorrectly handling the 8+ pixels at the end of each line.
sourcefn wait_refresh_complete(&self, marker: u32) -> u32
fn wait_refresh_complete(&self, marker: u32) -> u32
Takes a marker returned by partial_refresh
and blocks until that
refresh has been reflected on the display.
Returns the collusion_test result which is supposed to be
related to the collusion information.