Remove a stray setReserve that causes dynamic allocation in picture creation.
authorcommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 21 Jan 2014 20:48:46 +0000 (20:48 +0000)
committercommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 21 Jan 2014 20:48:46 +0000 (20:48 +0000)
This brings us down to about 10 calls to malloc per picture.

No measurable change in bench_record or bench_pictures.

BUG=
R=reed@google.com

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/132693009

git-svn-id: http://skia.googlecode.com/svn/trunk@13136 2bbb7eff-a529-9590-31e7-b0007b416f81

src/core/SkPictureRecord.cpp

index 4ae1c6b7dffa923a415f4d5fab7cbf6e1c9082b2..0851e3ffe5e6270f49182c4dd817ace9e3e9cb60 100644 (file)
@@ -41,8 +41,6 @@ SkPictureRecord::SkPictureRecord(uint32_t flags, SkBaseDevice* device) :
     fPointWrites = fRectWrites = fTextWrites = 0;
 #endif
 
-    fRestoreOffsetStack.setReserve(32);
-
     fBitmapHeap = SkNEW(SkBitmapHeap);
     fFlattenableHeap.setBitmapStorage(fBitmapHeap);
     fPathHeap = NULL;   // lazy allocate