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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
104 | 104 |
105 virtual ~SkPicture(); | 105 virtual ~SkPicture(); |
106 | 106 |
107 #ifdef SK_SUPPORT_LEGACY_PICTURE_CLONE | 107 #ifdef SK_SUPPORT_LEGACY_PICTURE_CLONE |
108 /** | 108 /** |
109 * Creates a thread-safe clone of the picture that is ready for playback. | 109 * Creates a thread-safe clone of the picture that is ready for playback. |
110 */ | 110 */ |
111 SkPicture* clone() const; | 111 SkPicture* clone() const; |
112 #endif | 112 #endif |
113 | 113 |
114 /** Replays the drawing commands on the specified canvas. | 114 /** Replays the drawing commands on the specified canvas. Note that |
115 this has the effect of unfurling this picture into the destination | |
116 canvas. Using the SkCanvas::drawPicture entry point gives the destinatio n | |
117 canvas the option of just taking a ref. | |
115 @param canvas the canvas receiving the drawing commands. | 118 @param canvas the canvas receiving the drawing commands. |
119 @param callback a callback that allows interruption of playback | |
116 */ | 120 */ |
117 void draw(SkCanvas* canvas, SkDrawPictureCallback* = NULL) const; | 121 void playback(SkCanvas* canvas, SkDrawPictureCallback* = NULL) const; |
reed1
2014/09/04 15:13:38
I wonder if this class should also be renamed, to
| |
122 | |
123 #ifdef SK_LEGACY_PICTURE_DRAW_API | |
124 void draw(SkCanvas* canvas, SkDrawPictureCallback* callback = NULL) const { | |
125 this->playback(canvas, callback); | |
126 } | |
127 #endif | |
118 | 128 |
119 #ifdef SK_LEGACY_PICTURE_SIZE_API | 129 #ifdef SK_LEGACY_PICTURE_SIZE_API |
120 int width() const { return SkScalarCeilToInt(fCullWidth); } | 130 int width() const { return SkScalarCeilToInt(fCullWidth); } |
121 int height() const { return SkScalarCeilToInt(fCullHeight); } | 131 int height() const { return SkScalarCeilToInt(fCullHeight); } |
122 #endif | 132 #endif |
123 | 133 |
124 /** Return the cull rect used when creating this picture: { 0, 0, cullWidth, cullHeight }. | 134 /** Return the cull rect used when creating this picture: { 0, 0, cullWidth, cullHeight }. |
125 It does not necessarily reflect the bounds of what has been recorded int o the picture. | 135 It does not necessarily reflect the bounds of what has been recorded int o the picture. |
126 @return the cull rect used to create this picture | 136 @return the cull rect used to create this picture |
127 */ | 137 */ |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
311 bool fWillPlaybackBitmaps; | 321 bool fWillPlaybackBitmaps; |
312 bool fHasText; | 322 bool fHasText; |
313 int fNumPaintWithPathEffectUses; | 323 int fNumPaintWithPathEffectUses; |
314 int fNumFastPathDashEffects; | 324 int fNumFastPathDashEffects; |
315 int fNumAAConcavePaths; | 325 int fNumAAConcavePaths; |
316 int fNumAAHairlineConcavePaths; | 326 int fNumAAHairlineConcavePaths; |
317 } fAnalysis; | 327 } fAnalysis; |
318 }; | 328 }; |
319 | 329 |
320 #endif | 330 #endif |
OLD | NEW |