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

Commit 32b1dd26 authored by Mathias Agopian's avatar Mathias Agopian Committed by Android Git Automerger
Browse files

am 85c5ca07: am 2f19f56a: Merge "Updade Surface (ANativeWindow) format based...

am 85c5ca07: am 2f19f56a: Merge "Updade Surface (ANativeWindow) format based on its buffers format" into gingerbread
parents 49d17354 85c5ca07
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -867,7 +867,18 @@ int Surface::setBuffersGeometry(int w, int h, int format)
        return BAD_VALUE;

    Mutex::Autolock _l(mSurfaceLock);
    if (mConnected == NATIVE_WINDOW_API_EGL) {
        return INVALID_OPERATION;
    }

    mBufferInfo.set(w, h, format);
    if (format != 0) {
        // we update the format of the surface as reported by query().
        // this is to allow applications to change the format of a surface's
        // buffer, and have it reflected in EGL; which is needed for
        // EGLConfig validation.
        mFormat = format;
    }
    return NO_ERROR;
}