summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/hwui/DisplayListRenderer.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/hwui/DisplayListRenderer.h b/libs/hwui/DisplayListRenderer.h
index dcf2cf2ddb39..98c341f08a88 100644
--- a/libs/hwui/DisplayListRenderer.h
+++ b/libs/hwui/DisplayListRenderer.h
@@ -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) {