diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-31 13:32:47 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-31 13:32:47 +0000 |
commit | 0a5c18ba79862ee4a348eff42cd4fbeb5ef12fee (patch) | |
tree | 538ad2bb608fc0a062431b88c610b877757f38af | |
parent | 5955202c805c7ef1448103cbf666972ea9d1ded1 (diff) |
(disabled) option to re-record a picture when loading
git-svn-id: http://skia.googlecode.com/svn/trunk@5366 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | samplecode/SamplePictFile.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/samplecode/SamplePictFile.cpp b/samplecode/SamplePictFile.cpp index 555732fdbb..3c1462e8f1 100644 --- a/samplecode/SamplePictFile.cpp +++ b/samplecode/SamplePictFile.cpp @@ -47,6 +47,17 @@ class PictFileView : public SampleView { if (stream.isValid()) { pic = SkNEW_ARGS(SkPicture, (&stream)); } + + if (false) { // re-record + SkPicture p2; + pic->draw(p2.beginRecording(pic->width(), pic->height())); + p2.endRecording(); + + SkString path2(path); + path2.append(".new.skp"); + SkFILEWStream writer(path2.c_str()); + p2.serialize(&writer); + } } return pic; } |