About Row-Level Partial Refresh
Our project environment:
display deriver ic: ST7568S
Embedded Wizard: version<11>, PlatformPackage<Generic.Software.LumA44>, ScreenSize<128,160> OutputFileNameExtension<c>set
EW_BSP_DISPLAY_UPDATE_SCRATCHPAD
Scratch-pad Buffer
In this case, our DDIC is based on Row-Level Partial Refresh.
That means that we have to reflash the Frame Buffer with entire row, not individual pixels.
Sometimes, the variable "updateRect"( return from CoreRoot__GetUpdateRegion ) is not expected values with entire row.
Is there any solution to solve this problem?
Thank you,
Charles
static void EwUpdate( XViewport* aViewport, CoreRoot aApplication )
{
XBitmap* bitmap;
GraphicsCanvas canvas = EwNewObject( GraphicsCanvas, 0 );
XRect updateRect = {{ 0, 0 }, { 0, 0 }};
updateRect.
if ( !canvas )
return;
if ( DisplayInfo.UpdateMode == EW_BSP_DISPLAY_UPDATE_NORMAL )
{
bitmap = EwBeginUpdate( aViewport );
/* redraw the dirty area of the screen */
if ( bitmap )
{
GraphicsCanvas__AttachBitmap( canvas, (XHandle)bitmap );
updateRect = CoreRoot__UpdateGE20( aApplication, canvas );
GraphicsCanvas__DetachBitmap( canvas );
EwEndUpdate( aViewport, updateRect );
}
}
else
{
int regions = CoreRoot__BeginUpdate( aApplication );
while ( regions-- )
{
/* get rectangular area of the update region for scratch-pad buffer */
if ( DisplayInfo.UpdateMode == EW_BSP_DISPLAY_UPDATE_SCRATCHPAD )
updateRect = CoreRoot__GetUpdateRegion( aApplication, regions );
/* iterate through all update areas */
while ( EwBspDisplayGetUpdateArea( &updateRect ))
{
/* update the current subarea */
bitmap = EwBeginUpdateArea( aViewport, updateRect );
GraphicsCanvas__AttachBitmap( canvas, (XHandle)bitmap );
CoreRoot__UpdateCanvas( aApplication, canvas, updateRect.Point1 );
GraphicsCanvas__DetachBitmap( canvas );
EwEndUpdate( aViewport, updateRect );
}
if ( DisplayInfo.UpdateMode != EW_BSP_DISPLAY_UPDATE_SCRATCHPAD )
break;
}
CoreRoot__EndUpdate( aApplication );
}
}