Methods Summary |
---|
static android.view.HardwareLayer | adoptTextureLayer(HardwareRenderer renderer, long layer)
return new HardwareLayer(renderer, layer);
|
public boolean | copyInto(android.graphics.Bitmap bitmap)Copies this layer into the specified bitmap.
return mRenderer.copyLayerInto(this, bitmap);
|
public void | destroy()Destroys resources without waiting for a GC.
if (!isValid()) {
// Already destroyed
return;
}
mRenderer.onLayerDestroyed(this);
mRenderer = null;
mFinalizer.release();
mFinalizer = null;
|
public void | detachSurfaceTexture()Indicates that this layer has lost its texture.
mRenderer.detachSurfaceTexture(mFinalizer.get());
|
public long | getDeferredLayerUpdater()
return mFinalizer.get();
|
public long | getLayerHandle()
return mFinalizer.get();
|
public boolean | isValid()Indicates whether this layer can be rendered.
return mFinalizer != null && mFinalizer.get() != 0;
|
private static native int | nGetTexName(long layerUpdater)
|
private static native boolean | nPrepare(long layerUpdater, int width, int height, boolean isOpaque)
|
private static native void | nSetLayerPaint(long layerUpdater, long paint)
|
private static native void | nSetSurfaceTexture(long layerUpdater, android.graphics.SurfaceTexture surface, boolean isAlreadyAttached)
|
private static native void | nSetTransform(long layerUpdater, long matrix)
|
private static native void | nUpdateRenderLayer(long layerUpdater, long displayList, int left, int top, int right, int bottom)
|
private static native void | nUpdateSurfaceTexture(long layerUpdater)
|
public boolean | prepare(int width, int height, boolean isOpaque)Update the layer's properties. Note that after calling this isValid() may
return false if the requested width/height cannot be satisfied
return nPrepare(mFinalizer.get(), width, height, isOpaque);
|
public void | setLayerPaint(android.graphics.Paint paint)Update the paint used when drawing this layer.
nSetLayerPaint(mFinalizer.get(), paint.mNativePaint);
mRenderer.pushLayerUpdate(this);
|
public void | setSurfaceTexture(android.graphics.SurfaceTexture surface)
nSetSurfaceTexture(mFinalizer.get(), surface, false);
mRenderer.pushLayerUpdate(this);
|
public void | setTransform(android.graphics.Matrix matrix)Sets an optional transform on this layer.
nSetTransform(mFinalizer.get(), matrix.native_instance);
mRenderer.pushLayerUpdate(this);
|
public void | updateSurfaceTexture()
nUpdateSurfaceTexture(mFinalizer.get());
mRenderer.pushLayerUpdate(this);
|