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

Commit f6a63ae3 authored by Romain Guy's avatar Romain Guy
Browse files

Fix memory leak in OpenGLRenderer.

When creating a display list, matrices are duplicated locally. They
were however never deleted, thus causing apps to slowly leak memory
(a matrix is about 40 bytes.)

Change-Id: Iac465b720d4c4c9b5ca3fce870c0c912c14a74ab
parent c989d867
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -419,7 +419,9 @@ private:
    inline void addMatrix(SkMatrix* matrix) {
        // Copying the matrix is cheap and prevents against the user changing the original
        // matrix before the operation that uses it
        addInt((int) new SkMatrix(*matrix));
        SkMatrix* copy = new SkMatrix(*matrix);
        addInt((int) copy);
        mMatrices.add(copy);
    }

    inline void addBitmap(SkBitmap* bitmap) {