Remove picture pre-allocation from SkPictureRecorder
authorrobertphillips <robertphillips@google.com>
Wed, 11 Jun 2014 18:37:55 +0000 (11:37 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 11 Jun 2014 18:37:55 +0000 (11:37 -0700)
commit0bdbea75ff1a6f3c313c18cab0139728967cb93e
tree010e60572e146ff0b282d5d7c76fb7d380e135f1
parentf0419e96b4b52b85fafd0d589c56944841dcda06
Remove picture pre-allocation from SkPictureRecorder

This CL improves the separation of the SkPicture and SkPictureRecord classes. It delays creation of the SkPicture (in SkPictureRecorder) until recording is actually completed. To accomplish this the SkRecord-derived classes now get SkPathHeap and SkPictureContentInfo members that are absorbed by the SkPicture when it is constructed.

As an ancillary change, this CL also moves the SkPictureContentInfo object from SkPicture to SkPicturePlayback. This is intended to centralize all the data in the SkPicturePlayback object.

R=mtklein@google.com, reed@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/324293004
12 files changed:
include/core/SkPicture.h
include/core/SkPictureRecorder.h
src/core/SkBBoxHierarchyRecord.cpp
src/core/SkBBoxHierarchyRecord.h
src/core/SkBBoxRecord.h
src/core/SkPicture.cpp
src/core/SkPicturePlayback.cpp
src/core/SkPicturePlayback.h
src/core/SkPictureRecord.cpp
src/core/SkPictureRecord.h
src/core/SkPictureRecorder.cpp
tests/CanvasTest.cpp