Bug 834243 - avoid calling serverSurfaceChanged before the compositor is created - r=vladv

This commit is contained in:
Benoit Jacob 2013-11-20 17:50:54 -05:00
parent 1cbdc1508d
commit 4d158f396f
2 changed files with 11 additions and 2 deletions

View File

@ -153,6 +153,10 @@ public class GLController {
return mServerSurfaceValid;
}
public boolean isCompositorCreated() {
return mCompositorCreated;
}
private void initEGL() {
if (mEGL != null) {
return;

View File

@ -514,8 +514,13 @@ public class LayerView extends FrameLayout implements Tabs.OnTabsChangedListener
* TextureView instead of a SurfaceView, the first phase is skipped.
*/
private void onSizeChanged(int width, int height) {
if (!mGLController.isServerSurfaceValid() || mSurfaceView == null) {
surfaceChanged(width, height);
if (!mGLController.isCompositorCreated()) {
return;
}
surfaceChanged(width, height);
if (mSurfaceView == null) {
return;
}