private transient boolean closed = false;
protected ICanvasContext canvasContext;
+ private boolean useVolatileImage = true;
+
// Marks the content dirty
protected IContentListener contentListener = new IContentListener() {
@Override
public IHintContext getHintContext() {
return hintCtx;
}
+
+ public void setUseVolatileImage(boolean useVolatileImage) {
+ this.useVolatileImage = useVolatileImage;
+ }
+
+ public boolean isUseVolatileImage() {
+ return useVolatileImage;
+ }
private void paintScenegraph(Graphics2D g2d, Rectangle controlBounds) {
Color bg = getBackground();
startmem = Runtime.getRuntime().freeMemory();
start = System.nanoTime();
}
- VolatileImage buffer = paintToVolatileImage(g2d, b);
+ VolatileImage buffer = null;
+ if (useVolatileImage)
+ buffer = paintToVolatileImage(g2d, b);
if (closed)
return;
if (DebugPolicy.PERF_CHASSIS_RENDER_FRAME) {