Merge "Destroy eglSurface before recreating." into lmp-dev

This commit is contained in:
Michael Lentine 2014-08-20 19:38:19 +00:00 committed by Android (Google) Code Review
commit 4d7c41008d

View File

@ -401,6 +401,11 @@ status_t DisplayDevice::orientationToTransfrom(
void DisplayDevice::setDisplaySize(const int newWidth, const int newHeight) {
dirtyRegion.set(getBounds());
if (mSurface != EGL_NO_SURFACE) {
eglDestroySurface(mDisplay, mSurface);
mSurface = EGL_NO_SURFACE;
}
mDisplaySurface->resizeBuffers(newWidth, newHeight);
ANativeWindow* const window = mNativeWindow.get();