public class LegacyRefreshStrategy extends java.lang.Object implements BufferRefreshStrategy
It consists in swapping the back buffer and the display front buffer at flush time and to let the BSP restore itself the back buffer with the content of the previous drawings (the past) before unlocking the Graphics Engine after a flush. By consequence, the past is always available before making the very first drawing after a flush.
| Constructor and Description |
|---|
LegacyRefreshStrategy() |
| Modifier and Type | Method and Description |
|---|---|
void |
newDrawingRegion(DisplayBufferManager bufferManager,
ej.microui.display.Rectangle rectangle,
boolean drawingNow)
Notifies that a region will be modified by the application in the display back buffer.
|
void |
refresh(DisplayBufferManager bufferManager)
Refreshes the display by calling
DisplayBufferManager#flush(ej.fp.widget.display.Rectangle[]). |
void |
setBufferCount(int bufferCount)
Sets the number of buffers.
|
void |
setDisplaySize(int width,
int height)
Sets the display size.
|
public void setDisplaySize(int width,
int height)
BufferRefreshStrategysetDisplaySize in interface BufferRefreshStrategywidth - the width of the display.height - the height of the display.public void setBufferCount(int bufferCount)
BufferRefreshStrategysetBufferCount in interface BufferRefreshStrategybufferCount - the number of buffers.public void newDrawingRegion(DisplayBufferManager bufferManager, ej.microui.display.Rectangle rectangle, boolean drawingNow)
BufferRefreshStrategyThe implementation can perform some drawings.
Called when a drawing is done or when the user declares a dirty region.
newDrawingRegion in interface BufferRefreshStrategybufferManager - the display buffer manager.rectangle - the drawing region.drawingNow - true if a drawing is following this call, false otherwise.LLUIDisplayImpl.newDrawingRegion(int, int, int, int, boolean)public void refresh(DisplayBufferManager bufferManager)
BufferRefreshStrategyDisplayBufferManager#flush(ej.fp.widget.display.Rectangle[]).refresh in interface BufferRefreshStrategybufferManager - the display buffer manager.