| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 */ | 124 */ |
| 125 SkPicture* clone() const; | 125 SkPicture* clone() const; |
| 126 | 126 |
| 127 /** | 127 /** |
| 128 * Creates multiple thread-safe clones of this picture that are ready for | 128 * Creates multiple thread-safe clones of this picture that are ready for |
| 129 * playback. The resulting clones are stored in the provided array of | 129 * playback. The resulting clones are stored in the provided array of |
| 130 * SkPictures. | 130 * SkPictures. |
| 131 */ | 131 */ |
| 132 void clone(SkPicture* pictures, int count) const; | 132 void clone(SkPicture* pictures, int count) const; |
| 133 | 133 |
| 134 #ifdef SK_SUPPORT_LEGACY_RECORDING_FLAG | |
| 135 // TODO: kUsePathBoundsForClip_RecordingFlag no longer belongs in | |
| 136 // SkPicture. It should be moved to SkPictureRecorder (or just made | |
| 137 // the default behavior). | |
| 138 enum RecordingFlags { | |
| 139 /* This flag specifies that when clipPath() is called, the path will | |
| 140 be faithfully recorded, but the recording canvas' current clip will | |
| 141 only see the path's bounds. This speeds up the recording process | |
| 142 without compromising the fidelity of the playback. The only side- | |
| 143 effect for recording is that calling getTotalClip() or related | |
| 144 clip-query calls will reflect the path's bounds, not the actual | |
| 145 path. | |
| 146 */ | |
| 147 kUsePathBoundsForClip_RecordingFlag = 0x01 | |
| 148 }; | |
| 149 #endif | |
| 150 | |
| 151 /** Replays the drawing commands on the specified canvas. | 134 /** Replays the drawing commands on the specified canvas. |
| 152 @param canvas the canvas receiving the drawing commands. | 135 @param canvas the canvas receiving the drawing commands. |
| 153 */ | 136 */ |
| 154 void draw(SkCanvas* canvas, SkDrawPictureCallback* = NULL) const; | 137 void draw(SkCanvas* canvas, SkDrawPictureCallback* = NULL) const; |
| 155 | 138 |
| 156 /** Return the width of the picture's recording canvas. This | 139 /** Return the width of the picture's recording canvas. This |
| 157 value reflects what was passed to setSize(), and does not necessarily | 140 value reflects what was passed to setSize(), and does not necessarily |
| 158 reflect the bounds of what has been recorded into the picture. | 141 reflect the bounds of what has been recorded into the picture. |
| 159 @return the width of the picture's recording canvas | 142 @return the width of the picture's recording canvas |
| 160 */ | 143 */ |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 */ | 332 */ |
| 350 class SK_API SkDrawPictureCallback { | 333 class SK_API SkDrawPictureCallback { |
| 351 public: | 334 public: |
| 352 SkDrawPictureCallback() {} | 335 SkDrawPictureCallback() {} |
| 353 virtual ~SkDrawPictureCallback() {} | 336 virtual ~SkDrawPictureCallback() {} |
| 354 | 337 |
| 355 virtual bool abortDrawing() = 0; | 338 virtual bool abortDrawing() = 0; |
| 356 }; | 339 }; |
| 357 | 340 |
| 358 #endif | 341 #endif |
| OLD | NEW |