OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2007 The Android Open Source Project | 3 * Copyright 2007 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef SkPicture_DEFINED | 10 #ifndef SkPicture_DEFINED |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 drawing a fraction of a large scene into a smaller viewport. | 108 drawing a fraction of a large scene into a smaller viewport. |
109 | 109 |
110 In most cases the record cost is offset by the playback improvement | 110 In most cases the record cost is offset by the playback improvement |
111 after a frame or two of tiled rendering (and complex pictures that | 111 after a frame or two of tiled rendering (and complex pictures that |
112 induce the worst record times will generally get the largest | 112 induce the worst record times will generally get the largest |
113 speedups at playback time). | 113 speedups at playback time). |
114 | 114 |
115 Note: Currently this is not serializable, the bounding data will be | 115 Note: Currently this is not serializable, the bounding data will be |
116 discarded if you serialize into a stream and then deserialize. | 116 discarded if you serialize into a stream and then deserialize. |
117 */ | 117 */ |
118 kOptimizeForClippedPlayback_RecordingFlag = 0x02 | 118 kOptimizeForClippedPlayback_RecordingFlag = 0x02, |
| 119 /* |
| 120 This flag disables all the picture recording optimizations (i.e., |
| 121 those in SkPictureRecord). It is mainly intended for testing the |
| 122 existing optimizations (i.e., to actually have the pattern |
| 123 appear in an .skp we have to disable the optimization). This |
| 124 option doesn't affect the optimizations controlled by |
| 125 'kOptimizeForClippedPlayback_RecordingFlag'. |
| 126 */ |
| 127 kDisableRecordOptimizations_RecordingFlag = 0x04 |
119 }; | 128 }; |
120 | 129 |
121 /** Returns the canvas that records the drawing commands. | 130 /** Returns the canvas that records the drawing commands. |
122 @param width the base width for the picture, as if the recording | 131 @param width the base width for the picture, as if the recording |
123 canvas' bitmap had this width. | 132 canvas' bitmap had this width. |
124 @param height the base width for the picture, as if the recording | 133 @param height the base width for the picture, as if the recording |
125 canvas' bitmap had this height. | 134 canvas' bitmap had this height. |
126 @param recordFlags optional flags that control recording. | 135 @param recordFlags optional flags that control recording. |
127 @return the picture canvas. | 136 @return the picture canvas. |
128 */ | 137 */ |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 */ | 240 */ |
232 SkCanvas* getRecordingCanvas() const { return fCanvas; } | 241 SkCanvas* getRecordingCanvas() const { return fCanvas; } |
233 | 242 |
234 private: | 243 private: |
235 SkPicture* fPicture; | 244 SkPicture* fPicture; |
236 SkCanvas* fCanvas; | 245 SkCanvas* fCanvas; |
237 }; | 246 }; |
238 | 247 |
239 | 248 |
240 #endif | 249 #endif |
OLD | NEW |