Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f2568dea authored by Michael Lentine's avatar Michael Lentine
Browse files

Destroy eglSurface before recreating.

Bug: 16856208

Change-Id: Ifb5c8997afab4bc922356a3542d1f899a2546855
parent 7b90258c
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -401,6 +401,11 @@ status_t DisplayDevice::orientationToTransfrom(
void DisplayDevice::setDisplaySize(const int newWidth, const int newHeight) {
void DisplayDevice::setDisplaySize(const int newWidth, const int newHeight) {
    dirtyRegion.set(getBounds());
    dirtyRegion.set(getBounds());


    if (mSurface != EGL_NO_SURFACE) {
        eglDestroySurface(mDisplay, mSurface);
        mSurface = EGL_NO_SURFACE;
    }

    mDisplaySurface->resizeBuffers(newWidth, newHeight);
    mDisplaySurface->resizeBuffers(newWidth, newHeight);


    ANativeWindow* const window = mNativeWindow.get();
    ANativeWindow* const window = mNativeWindow.get();