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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
125 */ | 125 */ |
126 SkPicture* clone() const; | 126 SkPicture* clone() const; |
127 | 127 |
128 /** | 128 /** |
129 * Creates multiple thread-safe clones of this picture that are ready for | 129 * Creates multiple thread-safe clones of this picture that are ready for |
130 * playback. The resulting clones are stored in the provided array of | 130 * playback. The resulting clones are stored in the provided array of |
131 * SkPictures. | 131 * SkPictures. |
132 */ | 132 */ |
133 void clone(SkPicture* pictures, int count) const; | 133 void clone(SkPicture* pictures, int count) const; |
134 | 134 |
135 #ifdef SK_SUPPORT_LEGACY_RECORDING_FLAG | |
scroggo
2014/06/05 17:58:16
Android never uses kUsePathBoundsForClip_Recording
| |
135 // TODO: kUsePathBoundsForClip_RecordingFlag no longer belongs in | 136 // TODO: kUsePathBoundsForClip_RecordingFlag no longer belongs in |
136 // SkPicture. It should be moved to SkPictureRecorder (or just made | 137 // SkPicture. It should be moved to SkPictureRecorder (or just made |
137 // the default behavior). | 138 // the default behavior). |
138 enum RecordingFlags { | 139 enum RecordingFlags { |
139 /* This flag specifies that when clipPath() is called, the path will | 140 /* This flag specifies that when clipPath() is called, the path will |
140 be faithfully recorded, but the recording canvas' current clip will | 141 be faithfully recorded, but the recording canvas' current clip will |
141 only see the path's bounds. This speeds up the recording process | 142 only see the path's bounds. This speeds up the recording process |
142 without compromising the fidelity of the playback. The only side- | 143 without compromising the fidelity of the playback. The only side- |
143 effect for recording is that calling getTotalClip() or related | 144 effect for recording is that calling getTotalClip() or related |
144 clip-query calls will reflect the path's bounds, not the actual | 145 clip-query calls will reflect the path's bounds, not the actual |
145 path. | 146 path. |
146 */ | 147 */ |
147 kUsePathBoundsForClip_RecordingFlag = 0x01 | 148 kUsePathBoundsForClip_RecordingFlag = 0x01 |
148 }; | 149 }; |
150 #endif | |
149 | 151 |
150 /** Replays the drawing commands on the specified canvas. This internally | 152 /** Replays the drawing commands on the specified canvas. This internally |
151 calls endRecording() if that has not already been called. | 153 calls endRecording() if that has not already been called. |
152 @param canvas the canvas receiving the drawing commands. | 154 @param canvas the canvas receiving the drawing commands. |
153 */ | 155 */ |
154 void draw(SkCanvas* canvas, SkDrawPictureCallback* = NULL) const; | 156 void draw(SkCanvas* canvas, SkDrawPictureCallback* = NULL) const; |
155 | 157 |
156 /** Return the width of the picture's recording canvas. This | 158 /** Return the width of the picture's recording canvas. This |
157 value reflects what was passed to setSize(), and does not necessarily | 159 value reflects what was passed to setSize(), and does not necessarily |
158 reflect the bounds of what has been recorded into the picture. | 160 reflect the bounds of what has been recorded into the picture. |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
459 */ | 461 */ |
460 class SK_API SkDrawPictureCallback { | 462 class SK_API SkDrawPictureCallback { |
461 public: | 463 public: |
462 SkDrawPictureCallback() {} | 464 SkDrawPictureCallback() {} |
463 virtual ~SkDrawPictureCallback() {} | 465 virtual ~SkDrawPictureCallback() {} |
464 | 466 |
465 virtual bool abortDrawing() = 0; | 467 virtual bool abortDrawing() = 0; |
466 }; | 468 }; |
467 | 469 |
468 #endif | 470 #endif |
OLD | NEW |