Merge "Create GL texture when it is missing for video layer" into ics-mr1
This commit is contained in:
@@ -74,11 +74,13 @@ public class HTML5VideoInline extends HTML5VideoView{
|
||||
public SurfaceTexture getSurfaceTexture(int videoLayerId) {
|
||||
// Create the surface texture.
|
||||
if (videoLayerId != mVideoLayerUsingSurfaceTexture
|
||||
|| mSurfaceTexture == null) {
|
||||
if (mTextureNames == null) {
|
||||
mTextureNames = new int[1];
|
||||
GLES20.glGenTextures(1, mTextureNames, 0);
|
||||
|| mSurfaceTexture == null
|
||||
|| mTextureNames == null) {
|
||||
if (mTextureNames != null) {
|
||||
GLES20.glDeleteTextures(1, mTextureNames, 0);
|
||||
}
|
||||
mTextureNames = new int[1];
|
||||
GLES20.glGenTextures(1, mTextureNames, 0);
|
||||
mSurfaceTexture = new SurfaceTexture(mTextureNames[0]);
|
||||
}
|
||||
mVideoLayerUsingSurfaceTexture = videoLayerId;
|
||||
|
||||
Reference in New Issue
Block a user