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

Commit c334549a authored by Prathmesh Prabhu's avatar Prathmesh Prabhu Committed by Android (Google) Code Review
Browse files

Merge "Do not queue trivial buffer for unsupported screenshot request." into nyc-dev

parents 91531884 f3209b03
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -3440,15 +3440,19 @@ status_t SurfaceFlinger::captureScreenImplLocked(
                    } else {
                        ALOGE("got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot");
                        result = INVALID_OPERATION;
                        window->cancelBuffer(window, buffer, syncFd);
                        buffer = NULL;
                    }
                    // destroy our image
                    eglDestroyImageKHR(mEGLDisplay, image);
                } else {
                    result = BAD_VALUE;
                }
                if (buffer) {
                    // queueBuffer takes ownership of syncFd
                    result = window->queueBuffer(window, buffer, syncFd);
                }
            }
        } else {
            result = BAD_VALUE;
        }
+6 −2
Original line number Diff line number Diff line
@@ -3478,15 +3478,19 @@ status_t SurfaceFlinger::captureScreenImplLocked(
                    } else {
                        ALOGE("got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot");
                        result = INVALID_OPERATION;
                        window->cancelBuffer(window, buffer, syncFd);
                        buffer = NULL;
                    }
                    // destroy our image
                    eglDestroyImageKHR(mEGLDisplay, image);
                } else {
                    result = BAD_VALUE;
                }
                if (buffer) {
                    // queueBuffer takes ownership of syncFd
                    result = window->queueBuffer(window, buffer, syncFd);
                }
            }
        } else {
            result = BAD_VALUE;
        }