Commit ae0c126a by Yuly Novikov Committed by Commit Bot

Move getSwapBehavior call to be after SurfaceImpl initialize

Otherwise, end2end tests crash on Nexus 5X, since the underlying EGL surface doesn't exist at the time of getSwapBehavior call. BUG=angleproject:1362 TEST=angle_end2end_tests on Nexus 5X Change-Id: I550e46ee82592b9d1ea49a3c968d7ffad3ab06f7 Reviewed-on: https://chromium-review.googlesource.com/349430Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
parent 7c5d2364
...@@ -86,11 +86,12 @@ Surface::~Surface() ...@@ -86,11 +86,12 @@ Surface::~Surface()
Error Surface::initialize() Error Surface::initialize()
{ {
ANGLE_TRY(mImplementation->initialize());
// Initialized here since impl is nullptr in the constructor. // Initialized here since impl is nullptr in the constructor.
// Must happen after implementation initialize for Android.
mSwapBehavior = mImplementation->getSwapBehavior(); mSwapBehavior = mImplementation->getSwapBehavior();
ANGLE_TRY(mImplementation->initialize());
// Must happen after implementation initialize for OSX. // Must happen after implementation initialize for OSX.
mState.defaultFramebuffer = createDefaultFramebuffer(); mState.defaultFramebuffer = createDefaultFramebuffer();
ASSERT(mState.defaultFramebuffer != nullptr); ASSERT(mState.defaultFramebuffer != nullptr);
......
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