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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 * decoding, the decoder must be set on the SkReadBuffer parameter by calli
ng | 98 * decoding, the decoder must be set on the SkReadBuffer parameter by calli
ng |
99 * SkReadBuffer::setBitmapDecoder() before calling SkPicture::CreateFromBuf
fer(). | 99 * SkReadBuffer::setBitmapDecoder() before calling SkPicture::CreateFromBuf
fer(). |
100 * @param SkReadBuffer Serialized picture data. | 100 * @param SkReadBuffer Serialized picture data. |
101 * @return A new SkPicture representing the serialized data, or NULL if the
buffer is | 101 * @return A new SkPicture representing the serialized data, or NULL if the
buffer is |
102 * invalid. | 102 * invalid. |
103 */ | 103 */ |
104 static SkPicture* CreateFromBuffer(SkReadBuffer&); | 104 static SkPicture* CreateFromBuffer(SkReadBuffer&); |
105 | 105 |
106 virtual ~SkPicture(); | 106 virtual ~SkPicture(); |
107 | 107 |
108 #ifdef SK_SUPPORT_LEGACY_PICTURE_CLONE | |
109 /** | |
110 * Creates a thread-safe clone of the picture that is ready for playback. | |
111 */ | |
112 SkPicture* clone() const; | |
113 #endif | |
114 | |
115 /** Replays the drawing commands on the specified canvas. Note that | 108 /** Replays the drawing commands on the specified canvas. Note that |
116 this has the effect of unfurling this picture into the destination | 109 this has the effect of unfurling this picture into the destination |
117 canvas. Using the SkCanvas::drawPicture entry point gives the destinatio
n | 110 canvas. Using the SkCanvas::drawPicture entry point gives the destinatio
n |
118 canvas the option of just taking a ref. | 111 canvas the option of just taking a ref. |
119 @param canvas the canvas receiving the drawing commands. | 112 @param canvas the canvas receiving the drawing commands. |
120 @param callback a callback that allows interruption of playback | 113 @param callback a callback that allows interruption of playback |
121 */ | 114 */ |
122 void playback(SkCanvas* canvas, SkDrawPictureCallback* = NULL) const; | 115 void playback(SkCanvas* canvas, SkDrawPictureCallback* = NULL) const; |
123 | 116 |
124 #ifdef SK_LEGACY_PICTURE_DRAW_API | 117 #ifdef SK_LEGACY_PICTURE_DRAW_API |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 bool fWillPlaybackBitmaps; | 321 bool fWillPlaybackBitmaps; |
329 bool fHasText; | 322 bool fHasText; |
330 int fNumPaintWithPathEffectUses; | 323 int fNumPaintWithPathEffectUses; |
331 int fNumFastPathDashEffects; | 324 int fNumFastPathDashEffects; |
332 int fNumAAConcavePaths; | 325 int fNumAAConcavePaths; |
333 int fNumAAHairlineConcavePaths; | 326 int fNumAAHairlineConcavePaths; |
334 } fAnalysis; | 327 } fAnalysis; |
335 }; | 328 }; |
336 | 329 |
337 #endif | 330 #endif |
OLD | NEW |