When changing orientations very fast, there might be 2 MosaicPreviewRenderer
instances accessing the SRI native library at the same time. The library is not
designed so.
bug:
8151753
Change-Id: Ie7a381349feeb95b40bae3c093cfcb66acba9069
mPreviewBufferSize = bufSize;
setupMosaicer(mPreviewWidth, mPreviewHeight, mPreviewBufferSize);
setStripType(Mosaic.STRIPTYPE_WIDE);
- reset();
+ // no need to call reset() here. reset() should be called by the client
+ // after this initialization before calling other methods of this object.
}
public void clear() {
break;
case MSG_RELEASE:
doRelease();
+ mEglThreadBlockVar.open();
break;
}
}
}
public void release() {
- mEglHandler.sendEmptyMessage(EGLHandler.MSG_RELEASE);
+ mEglHandler.sendMessageSync(EGLHandler.MSG_RELEASE);
}
public void showPreviewFrameSync() {