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

Commit caa81f0e authored by Mathias Agopian's avatar Mathias Agopian Committed by Android (Google) Code Review
Browse files

Merge "make sure to unlock the screenshot's buffer on destruction" into jb-mr2-dev

parents 9dd8d897 8000d069
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -170,6 +170,7 @@ private:

public:
    ScreenshotClient();
    ~ScreenshotClient();

    // frees the previous screenshot and capture a new one
    status_t update(const sp<IBinder>& display);
+4 −0
Original line number Diff line number Diff line
@@ -627,6 +627,10 @@ ScreenshotClient::ScreenshotClient()
    memset(&mBuffer, 0, sizeof(mBuffer));
}

ScreenshotClient::~ScreenshotClient() {
    ScreenshotClient::release();
}

sp<CpuConsumer> ScreenshotClient::getCpuConsumer() const {
    if (mCpuConsumer == NULL) {
        mCpuConsumer = new CpuConsumer(1);