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 13 matching lines...) Expand all Loading... |
24 class SkPictureRecord; | 24 class SkPictureRecord; |
25 class SkRecord; | 25 class SkRecord; |
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 #ifdef SK_SUPPORT_LEGACY_COMPUTESAVELAYER_FLAG | |
35 kComputeSaveLayerInfo_RecordFlag = 1 << 0, | |
36 #endif | |
37 | |
38 // If you call drawPicture() or drawDrawable() on the recording canvas,
this flag forces | 34 // If you call drawPicture() or drawDrawable() on the recording canvas,
this flag forces |
39 // that object to playback its contents immediately rather than reffing
the object. | 35 // that object to playback its contents immediately rather than reffing
the object. |
40 kPlaybackDrawPicture_RecordFlag = 1 << 1, | 36 kPlaybackDrawPicture_RecordFlag = 1 << 0, |
41 }; | 37 }; |
42 | 38 |
43 enum FinishFlags { | 39 enum FinishFlags { |
44 kReturnNullForEmpty_FinishFlag = 1 << 0, // no draw-ops will return n
ullptr | 40 kReturnNullForEmpty_FinishFlag = 1 << 0, // no draw-ops will return n
ullptr |
45 }; | 41 }; |
46 | 42 |
47 /** Returns the canvas that records the drawing commands. | 43 /** Returns the canvas that records the drawing commands. |
48 @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 |
49 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. |
50 @param bbhFactory factory to create desired acceleration structure | 46 @param bbhFactory factory to create desired acceleration structure |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 SkRect fCullRect; | 128 SkRect fCullRect; |
133 SkAutoTUnref<SkBBoxHierarchy> fBBH; | 129 SkAutoTUnref<SkBBoxHierarchy> fBBH; |
134 SkAutoTUnref<SkRecorder> fRecorder; | 130 SkAutoTUnref<SkRecorder> fRecorder; |
135 SkAutoTUnref<SkRecord> fRecord; | 131 SkAutoTUnref<SkRecord> fRecord; |
136 SkMiniRecorder fMiniRecorder; | 132 SkMiniRecorder fMiniRecorder; |
137 | 133 |
138 typedef SkNoncopyable INHERITED; | 134 typedef SkNoncopyable INHERITED; |
139 }; | 135 }; |
140 | 136 |
141 #endif | 137 #endif |
OLD | NEW |