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

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

am 46820412: am 8eb16af2: Merge "don\'t try to lock a buffer that wasn\'t...

am 46820412: am 8eb16af2: Merge "don\'t try to lock a buffer that wasn\'t allocated with SW usage bits" into gingerbread

Merge commit '468204124e95bbf74ae8cc000318ade29e311be6'

* commit '468204124e95bbf74ae8cc000318ade29e311be6':
  don't try to lock a buffer that wasn't allocated with SW usage bits
parents 043f03f0 2091772e
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -253,6 +253,7 @@ void Layer::reloadTexture(const Region& dirty)
    } else {
slowpath:
        GGLSurface t;
        if (buffer->usage & GRALLOC_USAGE_SW_READ_MASK) {
            status_t res = buffer->lock(&t, GRALLOC_USAGE_SW_READ_OFTEN);
            LOGE_IF(res, "error %d (%s) locking buffer %p",
                    res, strerror(res), buffer.get());
@@ -260,6 +261,9 @@ slowpath:
                mBufferManager.loadTexture(dirty, t);
                buffer->unlock();
            }
        } else {
            // we can't do anything
        }
    }
}