| 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 |
| 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. | 152 /** Replays the drawing commands on the specified canvas. |
| 151 @param canvas the canvas receiving the drawing commands. | 153 @param canvas the canvas receiving the drawing commands. |
| 152 */ | 154 */ |
| 153 void draw(SkCanvas* canvas, SkDrawPictureCallback* = NULL) const; | 155 void draw(SkCanvas* canvas, SkDrawPictureCallback* = NULL) const; |
| 154 | 156 |
| 155 /** Return the width of the picture's recording canvas. This | 157 /** Return the width of the picture's recording canvas. This |
| 156 value reflects what was passed to setSize(), and does not necessarily | 158 value reflects what was passed to setSize(), and does not necessarily |
| 157 reflect the bounds of what has been recorded into the picture. | 159 reflect the bounds of what has been recorded into the picture. |
| 158 @return the width of the picture's recording canvas | 160 @return the width of the picture's recording canvas |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 */ | 426 */ |
| 425 class SK_API SkDrawPictureCallback { | 427 class SK_API SkDrawPictureCallback { |
| 426 public: | 428 public: |
| 427 SkDrawPictureCallback() {} | 429 SkDrawPictureCallback() {} |
| 428 virtual ~SkDrawPictureCallback() {} | 430 virtual ~SkDrawPictureCallback() {} |
| 429 | 431 |
| 430 virtual bool abortDrawing() = 0; | 432 virtual bool abortDrawing() = 0; |
| 431 }; | 433 }; |
| 432 | 434 |
| 433 #endif | 435 #endif |
| OLD | NEW |