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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 * decoding, the decoder must be set on the SkReadBuffer parameter by calli
ng | 103 * decoding, the decoder must be set on the SkReadBuffer parameter by calli
ng |
104 * SkReadBuffer::setBitmapDecoder() before calling SkPicture::CreateFromBuf
fer(). | 104 * SkReadBuffer::setBitmapDecoder() before calling SkPicture::CreateFromBuf
fer(). |
105 * @param SkReadBuffer Serialized picture data. | 105 * @param SkReadBuffer Serialized picture data. |
106 * @return A new SkPicture representing the serialized data, or NULL if the
buffer is | 106 * @return A new SkPicture representing the serialized data, or NULL if the
buffer is |
107 * invalid. | 107 * invalid. |
108 */ | 108 */ |
109 static SkPicture* CreateFromBuffer(SkReadBuffer&); | 109 static SkPicture* CreateFromBuffer(SkReadBuffer&); |
110 | 110 |
111 virtual ~SkPicture(); | 111 virtual ~SkPicture(); |
112 | 112 |
| 113 #ifdef SK_SUPPORT_LEGACY_PICTURE_CLONE |
113 /** | 114 /** |
114 * Creates a thread-safe clone of the picture that is ready for playback. | 115 * Creates a thread-safe clone of the picture that is ready for playback. |
115 */ | 116 */ |
116 SkPicture* clone() const; | 117 SkPicture* clone() const; |
117 | 118 |
118 /** | 119 /** |
119 * Creates multiple thread-safe clones of this picture that are ready for | 120 * Creates multiple thread-safe clones of this picture that are ready for |
120 * playback. The resulting clones are stored in the provided array of | 121 * playback. The resulting clones are stored in the provided array of |
121 * SkPictures. | 122 * SkPictures. |
122 */ | 123 */ |
123 void clone(SkPicture* pictures, int count) const; | 124 void clone(SkPicture* pictures, int count) const; |
| 125 #endif |
124 | 126 |
125 /** Replays the drawing commands on the specified canvas. | 127 /** Replays the drawing commands on the specified canvas. |
126 @param canvas the canvas receiving the drawing commands. | 128 @param canvas the canvas receiving the drawing commands. |
127 */ | 129 */ |
128 void draw(SkCanvas* canvas, SkDrawPictureCallback* = NULL) const; | 130 void draw(SkCanvas* canvas, SkDrawPictureCallback* = NULL) const; |
129 | 131 |
130 /** Return the width of the picture's recording canvas. This | 132 /** Return the width of the picture's recording canvas. This |
131 value reflects what was passed to setSize(), and does not necessarily | 133 value reflects what was passed to setSize(), and does not necessarily |
132 reflect the bounds of what has been recorded into the picture. | 134 reflect the bounds of what has been recorded into the picture. |
133 @return the width of the picture's recording canvas | 135 @return the width of the picture's recording canvas |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 friend class GrGatherDevice; | 310 friend class GrGatherDevice; |
309 friend class SkDebugCanvas; | 311 friend class SkDebugCanvas; |
310 | 312 |
311 typedef SkRefCnt INHERITED; | 313 typedef SkRefCnt INHERITED; |
312 | 314 |
313 SkPicture(int width, int height, SkRecord*); // Takes ownership. | 315 SkPicture(int width, int height, SkRecord*); // Takes ownership. |
314 SkAutoTDelete<SkRecord> fRecord; | 316 SkAutoTDelete<SkRecord> fRecord; |
315 }; | 317 }; |
316 | 318 |
317 #endif | 319 #endif |
OLD | NEW |