Fix a black screen when opening a child Shell.

The black screen issue at starting frame was fixed a few months ago(https://codereview.chromium.org/92603002).
But it seems to work only for the initial Shell.
The last patch sets the background color to white, but this value is reset to 0 (black) by the VSyncAdapter after compositing the first frame.
So when a child Shell is newly opened, the black screen comes out again.
To fix this problem, setSurfaceViewBackgroundColor(Color.WHITE) needs to be moved to surfaceCreated() of SurfaceHolder.Callback.

Review URL: https://codereview.chromium.org/188203002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255339 0039d316-1c4b-4281-b951-d872f2087c98
parent 4cff9433
......@@ -77,6 +77,8 @@ public class ContentViewRenderView extends FrameLayout {
@Override
public void surfaceCreated(SurfaceHolder holder) {
setSurfaceViewBackgroundColor(Color.WHITE);
assert mNativeContentViewRenderView != 0;
nativeSurfaceCreated(mNativeContentViewRenderView);
......@@ -93,7 +95,6 @@ public class ContentViewRenderView extends FrameLayout {
}
};
mSurfaceView.getHolder().addCallback(mSurfaceCallback);
setSurfaceViewBackgroundColor(Color.WHITE);
mVSyncAdapter = new VSyncAdapter(getContext());
addView(mSurfaceView,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment