I am trying to optimize my display by sending only updated rectangle! I am unable to clearly identify if the update rect coordinates I receive inside EWupdate refer to Frame buffer or double frame buffer.. is there any way I can confirm or check it before transfer? Right now I am swapping framebuffer addresses inside EWupdate initiating currentframeBufferAddr=FrameBufferAddr; inside EWInit function.
here is a part of EWupdate code I have;
XBitmap* bitmap = EwBeginUpdate( aViewport );
GraphicsCanvas canvas = EwNewObject( GraphicsCanvas, 0 );
XRect updateRect = {{ 0, 0 }, { 0, 0 }};
/* let's redraw the dirty area of the screen. Cover the returned bitmap
objects within a canvas, so Mosaic can draw to it. */
if ( bitmap && canvas )
{
GraphicsCanvas__AttachBitmap( canvas, (XUInt32)bitmap );
updateRect = CoreRoot__UpdateGE20( aApplication, canvas );
GraphicsCanvas__DetachBitmap( canvas );
}
if(currentframeBufferAddr==FrameBufferAddr)
{
ILI9341_transferFrameBuffer(¤tframeBufferAddr, updateRect);
currentframeBufferAddr=DoubleBufferAddr;
}
else
{
ILI9341_transferFrameBuffer(¤tframeBufferAddr, updateRect);
currentframeBufferAddr=FrameBufferAddr;
}
#endif
/* complete the update */
if ( bitmap )
EwEndUpdate( aViewport, updateRect );