Allocate SkPictureFlat::fScratch lazily.
authorcommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 9 Jan 2014 16:45:45 +0000 (16:45 +0000)
committercommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 9 Jan 2014 16:45:45 +0000 (16:45 +0000)
commitff007e8ff358d9253de22291ebfd5fe7980512ed
treedb842fe62afea5f9b24b77d78d5facfd4eb288ae
parent96ab95f45800eda0c5a101cd65046b00a22bcc81
Allocate SkPictureFlat::fScratch lazily.

Cuts out half to two thirds of allocations of this object.
Since we're already lazily allocating fWriteBuffer, we don't have to add any other code complexity.

BUG=http://skbug.com/1980
R=mtklein@google.com, tomhudson@google.com

Author: tomhudson@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12992 2bbb7eff-a529-9590-31e7-b0007b416f81
src/core/SkPictureFlat.h