diff --git a/build/phone-hdpi-512-dalvik-heap.mk b/build/phone-hdpi-512-dalvik-heap.mk index 788b686096048..16e05055e0309 100644 --- a/build/phone-hdpi-512-dalvik-heap.mk +++ b/build/phone-hdpi-512-dalvik-heap.mk @@ -19,5 +19,5 @@ PRODUCT_PROPERTY_OVERRIDES += \ dalvik.vm.heapstartsize=5m \ - dalvik.vm.heapgrowthlimit=32m \ + dalvik.vm.heapgrowthlimit=48m \ dalvik.vm.heapsize=128m diff --git a/libs/hwui/DisplayListRenderer.h b/libs/hwui/DisplayListRenderer.h index dcf2cf2ddb39c..98c341f08a884 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) {