public void onFrameAvailable(android.graphics.SurfaceTexture surfaceTexture) { // Per SurfaceTexture's documentation, the callback may be invoked // from an arbitrary thread lock (this._enclosing.mLock) { this._enclosing.mUpdateLayer = true; } this._enclosing.postInvalidateDelayed(0); }
internal override android.view.HardwareLayer getHardwareLayer() { if (mLayer == null) { if (mAttachInfo == null || mAttachInfo.mHardwareRenderer == null) { return(null); } mLayer = mAttachInfo.mHardwareRenderer.createHardwareLayer(mOpaque); mSurface = mAttachInfo.mHardwareRenderer.createSurfaceTexture(mLayer); nSetDefaultBufferSize(mSurface, getWidth(), getHeight()); nCreateNativeWindow(mSurface); mUpdateListener = new _OnFrameAvailableListener_315(this); mSurface.setOnFrameAvailableListener(mUpdateListener); if (mListener != null) { mListener.onSurfaceTextureAvailable(mSurface, getWidth(), getHeight()); } } applyUpdate(); applyTransformMatrix(); return(mLayer); }
protected internal override void onDetachedFromWindow() { base.onDetachedFromWindow(); if (mLayer != null) { bool shouldRelease = true; if (mListener != null) { shouldRelease = mListener.onSurfaceTextureDestroyed(mSurface); } lock (mNativeWindowLock) { nDestroyNativeWindow(); } mLayer.destroy(); if (shouldRelease) { mSurface.release(); } mSurface = null; mLayer = null; } }
internal override android.view.HardwareLayer getHardwareLayer() { if (mLayer == null) { if (mAttachInfo == null || mAttachInfo.mHardwareRenderer == null) { return null; } mLayer = mAttachInfo.mHardwareRenderer.createHardwareLayer(mOpaque); mSurface = mAttachInfo.mHardwareRenderer.createSurfaceTexture(mLayer); nSetDefaultBufferSize(mSurface, getWidth(), getHeight()); nCreateNativeWindow(mSurface); mUpdateListener = new _OnFrameAvailableListener_315(this); mSurface.setOnFrameAvailableListener(mUpdateListener); if (mListener != null) { mListener.onSurfaceTextureAvailable(mSurface, getWidth(), getHeight()); } } applyUpdate(); applyTransformMatrix(); return mLayer; }
protected internal override void onDetachedFromWindow() { base.onDetachedFromWindow(); if (mLayer != null) { bool shouldRelease = true; if (mListener != null) { shouldRelease = mListener.onSurfaceTextureDestroyed(mSurface); } lock (mNativeWindowLock) { nDestroyNativeWindow(); } mLayer.destroy(); if (shouldRelease) { mSurface.release(); } mSurface = null; mLayer = null; } }
internal static void nUpdateTextureLayer(int layerId, int width, int height, bool opaque, android.graphics.SurfaceTexture surface) { throw new System.NotImplementedException(); }
private static void nSetDefaultBufferSize(android.graphics.SurfaceTexture surfaceTexture , int width, int height) { throw new System.NotImplementedException(); }
private void nCreateNativeWindow(android.graphics.SurfaceTexture surface) { throw new System.NotImplementedException(); }
private void initFromSurfaceTexture(android.graphics.SurfaceTexture surfaceTexture ) { throw new System.NotImplementedException(); }
public Surface(android.graphics.SurfaceTexture surfaceTexture) { throw new System.NotImplementedException(); }