am 493743e0: Merge "Flip TextureView\'s layer after calling setSurfaceTexture() Bug #6531172" into jb-dev
* commit '493743e0137f34939dd7f3674e9102942ef7e4e8': Flip TextureView's layer after calling setSurfaceTexture() Bug #6531172
This commit is contained in:
@@ -374,6 +374,14 @@ public class TextureView extends View {
|
|||||||
// tell mLayer about it and set the SurfaceTexture to use the
|
// tell mLayer about it and set the SurfaceTexture to use the
|
||||||
// current view size.
|
// current view size.
|
||||||
mUpdateSurface = false;
|
mUpdateSurface = false;
|
||||||
|
|
||||||
|
// Since we are updating the layer, force an update to ensure its
|
||||||
|
// parameters are correct (width, height, transform, etc.)
|
||||||
|
synchronized (mLock) {
|
||||||
|
mUpdateLayer = true;
|
||||||
|
}
|
||||||
|
mMatrixChanged = true;
|
||||||
|
|
||||||
mAttachInfo.mHardwareRenderer.setSurfaceTexture(mLayer, mSurface);
|
mAttachInfo.mHardwareRenderer.setSurfaceTexture(mLayer, mSurface);
|
||||||
nSetDefaultBufferSize(mSurface, getWidth(), getHeight());
|
nSetDefaultBufferSize(mSurface, getWidth(), getHeight());
|
||||||
}
|
}
|
||||||
@@ -471,7 +479,7 @@ public class TextureView extends View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void applyTransformMatrix() {
|
private void applyTransformMatrix() {
|
||||||
if (mMatrixChanged) {
|
if (mMatrixChanged && mLayer != null) {
|
||||||
mLayer.setTransform(mMatrix);
|
mLayer.setTransform(mMatrix);
|
||||||
mMatrixChanged = false;
|
mMatrixChanged = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user