Merge "Flip TextureView's layer after calling setSurfaceTexture() Bug #6531172" into jb-dev

This commit is contained in:
Romain Guy
2012-05-21 16:37:57 -07:00
committed by Android (Google) Code Review

View File

@@ -374,6 +374,14 @@ public class TextureView extends View {
// tell mLayer about it and set the SurfaceTexture to use the
// current view size.
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);
nSetDefaultBufferSize(mSurface, getWidth(), getHeight());
}
@@ -471,7 +479,7 @@ public class TextureView extends View {
}
private void applyTransformMatrix() {
if (mMatrixChanged) {
if (mMatrixChanged && mLayer != null) {
mLayer.setTransform(mMatrix);
mMatrixChanged = false;
}