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. It is | |
Justin Novosad
2013/03/25 18:34:55
This is too vague. I.e. What specific optimization
robertphillips
2013/04/01 18:08:52
I have changed the name and updated the comment -
| |
121 mainly intended for testing the existing optimizations. | |
122 */ | |
123 kDisableOptimizations_RecordingFlag = 0x04 | |
119 }; | 124 }; |
120 | 125 |
121 /** Returns the canvas that records the drawing commands. | 126 /** Returns the canvas that records the drawing commands. |
122 @param width the base width for the picture, as if the recording | 127 @param width the base width for the picture, as if the recording |
123 canvas' bitmap had this width. | 128 canvas' bitmap had this width. |
124 @param height the base width for the picture, as if the recording | 129 @param height the base width for the picture, as if the recording |
125 canvas' bitmap had this height. | 130 canvas' bitmap had this height. |
126 @param recordFlags optional flags that control recording. | 131 @param recordFlags optional flags that control recording. |
127 @return the picture canvas. | 132 @return the picture canvas. |
128 */ | 133 */ |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
231 */ | 236 */ |
232 SkCanvas* getRecordingCanvas() const { return fCanvas; } | 237 SkCanvas* getRecordingCanvas() const { return fCanvas; } |
233 | 238 |
234 private: | 239 private: |
235 SkPicture* fPicture; | 240 SkPicture* fPicture; |
236 SkCanvas* fCanvas; | 241 SkCanvas* fCanvas; |
237 }; | 242 }; |
238 | 243 |
239 | 244 |
240 #endif | 245 #endif |
OLD | NEW |