Merge "Allocate layers from the layers pool. Bug #3413433" into honeycomb

This commit is contained in:
Romain Guy
2011-02-02 21:05:35 -08:00
committed by Android (Google) Code Review
9 changed files with 306 additions and 81 deletions

View File

@@ -66,10 +66,11 @@ class GLES20Layer extends HardwareLayer {
@Override
void resize(int width, int height) {
if (!isValid() || width <= 0 || height <= 0) return;
if (width > mLayerWidth || height > mLayerHeight) {
mWidth = width;
mHeight = height;
mWidth = width;
mHeight = height;
if (width != mLayerWidth || height != mLayerHeight) {
int[] layerInfo = new int[2];
GLES20Canvas.nResizeLayer(mLayer, width, height, layerInfo);