OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkBBoxHierarchyRecord.h" | 8 #include "SkBBoxHierarchyRecord.h" |
9 #include "SkPicturePlayback.h" | 9 #include "SkPicturePlayback.h" |
10 #include "SkPictureRecord.h" | 10 #include "SkPictureRecord.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 if (NULL != fRecorder.get()) { | 53 if (NULL != fRecorder.get()) { |
54 return fRecorder.get(); | 54 return fRecorder.get(); |
55 } | 55 } |
56 return fPictureRecord.get(); | 56 return fPictureRecord.get(); |
57 } | 57 } |
58 | 58 |
59 SkPicture* SkPictureRecorder::endRecording() { | 59 SkPicture* SkPictureRecorder::endRecording() { |
60 SkPicture* picture = NULL; | 60 SkPicture* picture = NULL; |
61 | 61 |
62 if (NULL != fRecord.get()) { | 62 if (NULL != fRecord.get()) { |
63 // TODO: picture = SkNEW_ARGS(SkPicture, (fWidth, fHeight, fRecord.detac
h())); | 63 picture = SkNEW_ARGS(SkPicture, (fWidth, fHeight, fRecord.detach())); |
64 } | 64 } |
65 | 65 |
66 if (NULL != fPictureRecord.get()) { | 66 if (NULL != fPictureRecord.get()) { |
67 fPictureRecord->endRecording(); | 67 fPictureRecord->endRecording(); |
68 const bool deepCopyOps = false; | 68 const bool deepCopyOps = false; |
69 picture = SkNEW_ARGS(SkPicture, (fWidth, fHeight, *fPictureRecord.get(),
deepCopyOps)); | 69 picture = SkNEW_ARGS(SkPicture, (fWidth, fHeight, *fPictureRecord.get(),
deepCopyOps)); |
70 } | 70 } |
71 | 71 |
72 return picture; | 72 return picture; |
73 } | 73 } |
(...skipping 12 matching lines...) Expand all Loading... |
86 if (NULL != fRecord.get()) { | 86 if (NULL != fRecord.get()) { |
87 SkRecordDraw(*fRecord, canvas); | 87 SkRecordDraw(*fRecord, canvas); |
88 } | 88 } |
89 | 89 |
90 if (NULL != fPictureRecord.get()) { | 90 if (NULL != fPictureRecord.get()) { |
91 const bool deepCopyOps = true; | 91 const bool deepCopyOps = true; |
92 SkPicture picture(fWidth, fHeight, *fPictureRecord.get(), deepCopyOps); | 92 SkPicture picture(fWidth, fHeight, *fPictureRecord.get(), deepCopyOps); |
93 picture.draw(canvas); | 93 picture.draw(canvas); |
94 } | 94 } |
95 } | 95 } |
OLD | NEW |