am d435b56a: am 4d7c4100: Merge "Destroy eglSurface before recreating." into lmp-dev

* commit 'd435b56ab842f0787c1322d71bb8ed2f5e11b3bc':
  Destroy eglSurface before recreating.
This commit is contained in:
Michael Lentine 2014-08-21 00:57:00 +00:00 committed by Android Git Automerger
commit 64144c6562

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();