Commit ac2582d3 by Corentin Wallez

WindowSurfaceGLX: swap before resizing the child window

BUG=angleproject:892 Change-Id: I9b27777547624959fce6e045f9aac2652f139b9b Reviewed-on: https://chromium-review.googlesource.com/282058Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent 9de512e2
...@@ -117,6 +117,8 @@ egl::Error WindowSurfaceGLX::makeCurrent() ...@@ -117,6 +117,8 @@ egl::Error WindowSurfaceGLX::makeCurrent()
egl::Error WindowSurfaceGLX::swap() egl::Error WindowSurfaceGLX::swap()
{ {
mGLX.swapBuffers(mGLXWindow);
//TODO(cwallez) set up our own error handler to see if the call failed //TODO(cwallez) set up our own error handler to see if the call failed
unsigned int newParentWidth, newParentHeight; unsigned int newParentWidth, newParentHeight;
if (!getWindowDimensions(mParent, &newParentWidth, &newParentHeight)) if (!getWindowDimensions(mParent, &newParentWidth, &newParentHeight))
...@@ -130,11 +132,11 @@ egl::Error WindowSurfaceGLX::swap() ...@@ -130,11 +132,11 @@ egl::Error WindowSurfaceGLX::swap()
mParentWidth = newParentWidth; mParentWidth = newParentWidth;
mParentHeight = newParentHeight; mParentHeight = newParentHeight;
mGLX.waitGL();
XResizeWindow(mDisplay, mWindow, mParentWidth, mParentHeight); XResizeWindow(mDisplay, mWindow, mParentWidth, mParentHeight);
XSync(mDisplay, False); mGLX.waitX();
} }
mGLX.swapBuffers(mGLXWindow);
return egl::Error(EGL_SUCCESS); return egl::Error(EGL_SUCCESS);
} }
......
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