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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 return fPicture.detach(); | 62 return fPicture.detach(); |
63 } | 63 } |
64 | 64 |
65 void SkPictureRecorder::internalOnly_EnableOpts(bool enableOpts) { | 65 void SkPictureRecorder::internalOnly_EnableOpts(bool enableOpts) { |
66 if (NULL != fCanvas) { | 66 if (NULL != fCanvas) { |
67 fCanvas->internalOnly_EnableOpts(enableOpts); | 67 fCanvas->internalOnly_EnableOpts(enableOpts); |
68 } | 68 } |
69 } | 69 } |
70 | 70 |
71 #ifdef SK_BUILD_FOR_ANDROID | |
72 void SkPictureRecorder::partialReplay(SkCanvas* canvas) const { | 71 void SkPictureRecorder::partialReplay(SkCanvas* canvas) const { |
73 if (NULL == fPicture.get() || NULL == canvas) { | 72 if (NULL == fPicture.get() || NULL == canvas) { |
74 // Not recording or nothing to replay into | 73 // Not recording or nothing to replay into |
75 return; | 74 return; |
76 } | 75 } |
77 | 76 |
78 SkASSERT(NULL != fCanvas); | 77 SkASSERT(NULL != fCanvas); |
79 | 78 |
80 SkAutoTDelete<SkPicturePlayback> playback(SkPicture::FakeEndRecording(fPictu
re.get(), | 79 SkAutoTDelete<SkPicturePlayback> playback(SkPicture::FakeEndRecording(fPictu
re.get(), |
81 *fCanv
as, | 80 *fCanv
as, |
82 false)
); | 81 false)
); |
83 playback->draw(*canvas, NULL); | 82 playback->draw(*canvas, NULL); |
84 } | 83 } |
85 #endif | |
OLD | NEW |