Bitmap create() { if (dimension.width > 0 && dimension.height > 0) { Bitmap bitmap = factory.createBitmap(dimension.width, dimension.height, isTransparent); bitmap.setBackgroundColor(color); return bitmap; } return null; } }
/** * @return the bitmap of the second frame to draw on (may be null). */ public synchronized Bitmap getDrawingBitmap() { if (this.lmBitmap != null) { this.lmBitmap.setBackgroundColor(this.displayModel.getBackgroundColor()); } return this.lmBitmap; }
/** * This is called from <code>LayerManager</code> when drawing starts. * * @return the bitmap of the second frame to draw on (may be null). */ public Bitmap getDrawingBitmap() { /* * Layer manager only starts drawing a new bitmap when the last one is swapped (taken to * the screen). This ensures that the layer manager draws not too many frames. (only as * much as can get displayed). */ synchronized (this.allowSwap) { this.allowSwap.waitDisabled(); Bitmap b = this.lmBitmap.lock(); if (b != null) { b.setBackgroundColor(this.displayModel.getBackgroundColor()); } return b; } }
/** * @return the bitmap of the second frame to draw on (may be null). */ public synchronized Bitmap getDrawingBitmap() { if (this.lmBitmap != null) { this.lmBitmap.setBackgroundColor(this.displayModel.getBackgroundColor()); } return this.lmBitmap; }
Bitmap create() { if (dimension.width > 0 && dimension.height > 0) { Bitmap bitmap = factory.createBitmap(dimension.width, dimension.height, isTransparent); bitmap.setBackgroundColor(color); return bitmap; } return null; } }
/** * This is called from <code>LayerManager</code> when drawing starts. * * @return the bitmap of the second frame to draw on (may be null). */ public Bitmap getDrawingBitmap() { /* * Layer manager only starts drawing a new bitmap when the last one is swapped (taken to * the screen). This ensures that the layer manager draws not too many frames. (only as * much as can get displayed). */ synchronized (this.allowSwap) { this.allowSwap.waitDisabled(); Bitmap b = this.lmBitmap.lock(); if (b != null) { b.setBackgroundColor(this.displayModel.getBackgroundColor()); } return b; } }