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 #ifndef SkPictureRecorder_DEFINED | 8 #ifndef SkPictureRecorder_DEFINED |
9 #define SkPictureRecorder_DEFINED | 9 #define SkPictureRecorder_DEFINED |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 class SkRecorder; | 26 class SkRecorder; |
27 | 27 |
28 class SK_API SkPictureRecorder : SkNoncopyable { | 28 class SK_API SkPictureRecorder : SkNoncopyable { |
29 public: | 29 public: |
30 SkPictureRecorder(); | 30 SkPictureRecorder(); |
31 ~SkPictureRecorder(); | 31 ~SkPictureRecorder(); |
32 | 32 |
33 enum RecordFlags { | 33 enum RecordFlags { |
34 // This flag indicates that, if some BHH is being computed, saveLayer | 34 // This flag indicates that, if some BHH is being computed, saveLayer |
35 // information should also be extracted at the same time. | 35 // information should also be extracted at the same time. |
36 kComputeSaveLayerInfo_RecordFlag = 0x01 | 36 kComputeSaveLayerInfo_RecordFlag = 0x01, |
| 37 |
| 38 // If you call drawPicture() on the recording canvas, this flag forces |
| 39 // that to use SkPicture::playback() immediately rather than (e.g.) reff
ing the picture. |
| 40 kPlaybackDrawPicture_RecordFlag = 0x02, |
37 }; | 41 }; |
38 | 42 |
39 /** Returns the canvas that records the drawing commands. | 43 /** Returns the canvas that records the drawing commands. |
40 @param bounds the cull rect used when recording this picture. Any drawin
g the falls outside | 44 @param bounds the cull rect used when recording this picture. Any drawin
g the falls outside |
41 of this rect is undefined, and may be drawn or it may not. | 45 of this rect is undefined, and may be drawn or it may not. |
42 @param bbhFactory factory to create desired acceleration structure | 46 @param bbhFactory factory to create desired acceleration structure |
43 @param recordFlags optional flags that control recording. | 47 @param recordFlags optional flags that control recording. |
44 @return the canvas. | 48 @return the canvas. |
45 */ | 49 */ |
46 SkCanvas* beginRecording(const SkRect& bounds, | 50 SkCanvas* beginRecording(const SkRect& bounds, |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 SkRect fCullRect; | 106 SkRect fCullRect; |
103 SkAutoTUnref<SkBBoxHierarchy> fBBH; | 107 SkAutoTUnref<SkBBoxHierarchy> fBBH; |
104 SkAutoTUnref<SkRecorder> fRecorder; | 108 SkAutoTUnref<SkRecorder> fRecorder; |
105 SkAutoTUnref<SkRecord> fRecord; | 109 SkAutoTUnref<SkRecord> fRecord; |
106 SkMiniRecorder fMiniRecorder; | 110 SkMiniRecorder fMiniRecorder; |
107 | 111 |
108 typedef SkNoncopyable INHERITED; | 112 typedef SkNoncopyable INHERITED; |
109 }; | 113 }; |
110 | 114 |
111 #endif | 115 #endif |
OLD | NEW |