Loading core/java/android/view/TextureView.java +5 −4 Original line number Original line Diff line number Diff line Loading @@ -339,8 +339,7 @@ public class TextureView extends View { mLayer = mAttachInfo.mHardwareRenderer.createHardwareLayer(mOpaque); mLayer = mAttachInfo.mHardwareRenderer.createHardwareLayer(mOpaque); if (!mUpdateSurface) { if (!mUpdateSurface) { // We already have a SurfaceTexture to use, and we will pass it // Create a new SurfaceTexture for the layer. // to mLayer below. mSurface = mAttachInfo.mHardwareRenderer.createSurfaceTexture(mLayer); mSurface = mAttachInfo.mHardwareRenderer.createSurfaceTexture(mLayer); } } nSetDefaultBufferSize(mSurface, getWidth(), getHeight()); nSetDefaultBufferSize(mSurface, getWidth(), getHeight()); Loading @@ -359,7 +358,7 @@ public class TextureView extends View { }; }; mSurface.setOnFrameAvailableListener(mUpdateListener); mSurface.setOnFrameAvailableListener(mUpdateListener); if (mListener != null) { if (mListener != null && !mUpdateSurface) { mListener.onSurfaceTextureAvailable(mSurface, getWidth(), getHeight()); mListener.onSurfaceTextureAvailable(mSurface, getWidth(), getHeight()); } } } } Loading Loading @@ -669,7 +668,9 @@ public class TextureView extends View { * SurfaceTexture} is already being used by this view, it is immediately * SurfaceTexture} is already being used by this view, it is immediately * released and not be usable any more. The {@link * released and not be usable any more. The {@link * SurfaceTextureListener#onSurfaceTextureDestroyed} callback is <b>not</b> * SurfaceTextureListener#onSurfaceTextureDestroyed} callback is <b>not</b> * called. * called for the previous {@link SurfaceTexture}. Similarly, the {@link * SurfaceTextureListener#onSurfaceTextureAvailable} callback is <b>not</b> * called for the {@link SurfaceTexture} passed to setSurfaceTexture. * * * The {@link SurfaceTexture} object must be detached from all OpenGL ES * The {@link SurfaceTexture} object must be detached from all OpenGL ES * contexts prior to calling this method. * contexts prior to calling this method. Loading Loading
core/java/android/view/TextureView.java +5 −4 Original line number Original line Diff line number Diff line Loading @@ -339,8 +339,7 @@ public class TextureView extends View { mLayer = mAttachInfo.mHardwareRenderer.createHardwareLayer(mOpaque); mLayer = mAttachInfo.mHardwareRenderer.createHardwareLayer(mOpaque); if (!mUpdateSurface) { if (!mUpdateSurface) { // We already have a SurfaceTexture to use, and we will pass it // Create a new SurfaceTexture for the layer. // to mLayer below. mSurface = mAttachInfo.mHardwareRenderer.createSurfaceTexture(mLayer); mSurface = mAttachInfo.mHardwareRenderer.createSurfaceTexture(mLayer); } } nSetDefaultBufferSize(mSurface, getWidth(), getHeight()); nSetDefaultBufferSize(mSurface, getWidth(), getHeight()); Loading @@ -359,7 +358,7 @@ public class TextureView extends View { }; }; mSurface.setOnFrameAvailableListener(mUpdateListener); mSurface.setOnFrameAvailableListener(mUpdateListener); if (mListener != null) { if (mListener != null && !mUpdateSurface) { mListener.onSurfaceTextureAvailable(mSurface, getWidth(), getHeight()); mListener.onSurfaceTextureAvailable(mSurface, getWidth(), getHeight()); } } } } Loading Loading @@ -669,7 +668,9 @@ public class TextureView extends View { * SurfaceTexture} is already being used by this view, it is immediately * SurfaceTexture} is already being used by this view, it is immediately * released and not be usable any more. The {@link * released and not be usable any more. The {@link * SurfaceTextureListener#onSurfaceTextureDestroyed} callback is <b>not</b> * SurfaceTextureListener#onSurfaceTextureDestroyed} callback is <b>not</b> * called. * called for the previous {@link SurfaceTexture}. Similarly, the {@link * SurfaceTextureListener#onSurfaceTextureAvailable} callback is <b>not</b> * called for the {@link SurfaceTexture} passed to setSurfaceTexture. * * * The {@link SurfaceTexture} object must be detached from all OpenGL ES * The {@link SurfaceTexture} object must be detached from all OpenGL ES * contexts prior to calling this method. * contexts prior to calling this method. Loading