| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2007 The Android Open Source Project | 2 * Copyright 2007 The Android Open Source Project |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 | 8 |
| 9 #ifndef SkPicture_DEFINED | 9 #ifndef SkPicture_DEFINED |
| 10 #define SkPicture_DEFINED | 10 #define SkPicture_DEFINED |
| 11 | 11 |
| 12 #include "SkBitmap.h" | |
| 13 #include "SkDrawPictureCallback.h" | |
| 14 #include "SkImageDecoder.h" | 12 #include "SkImageDecoder.h" |
| 15 #include "SkRefCnt.h" | 13 #include "SkRefCnt.h" |
| 16 #include "SkTDArray.h" | 14 #include "SkTDArray.h" |
| 17 | 15 |
| 18 #if SK_SUPPORT_GPU | 16 #if SK_SUPPORT_GPU |
| 19 class GrContext; | 17 class GrContext; |
| 20 #endif | 18 #endif |
| 21 | 19 |
| 20 class SkAbortCallback; |
| 21 class SkBitmap; |
| 22 class SkBBoxHierarchy; | 22 class SkBBoxHierarchy; |
| 23 class SkCanvas; | 23 class SkCanvas; |
| 24 class SkData; | 24 class SkData; |
| 25 class SkPictureData; | 25 class SkPictureData; |
| 26 class SkPixelSerializer; | 26 class SkPixelSerializer; |
| 27 class SkStream; | 27 class SkStream; |
| 28 class SkWStream; | 28 class SkWStream; |
| 29 | 29 |
| 30 struct SkPictInfo; | 30 struct SkPictInfo; |
| 31 | 31 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 102 |
| 103 ~SkPicture(); | 103 ~SkPicture(); |
| 104 | 104 |
| 105 /** Replays the drawing commands on the specified canvas. Note that | 105 /** Replays the drawing commands on the specified canvas. Note that |
| 106 this has the effect of unfurling this picture into the destination | 106 this has the effect of unfurling this picture into the destination |
| 107 canvas. Using the SkCanvas::drawPicture entry point gives the destinatio
n | 107 canvas. Using the SkCanvas::drawPicture entry point gives the destinatio
n |
| 108 canvas the option of just taking a ref. | 108 canvas the option of just taking a ref. |
| 109 @param canvas the canvas receiving the drawing commands. | 109 @param canvas the canvas receiving the drawing commands. |
| 110 @param callback a callback that allows interruption of playback | 110 @param callback a callback that allows interruption of playback |
| 111 */ | 111 */ |
| 112 void playback(SkCanvas* canvas, SkDrawPictureCallback* = NULL) const; | 112 void playback(SkCanvas* canvas, SkAbortCallback* = NULL) const; |
| 113 | 113 |
| 114 /** Return the cull rect used when creating this picture: { 0, 0, cullWidth,
cullHeight }. | 114 /** Return the cull rect used when creating this picture: { 0, 0, cullWidth,
cullHeight }. |
| 115 It does not necessarily reflect the bounds of what has been recorded int
o the picture. | 115 It does not necessarily reflect the bounds of what has been recorded int
o the picture. |
| 116 @return the cull rect used to create this picture | 116 @return the cull rect used to create this picture |
| 117 */ | 117 */ |
| 118 SkRect cullRect() const { return fCullRect; } | 118 SkRect cullRect() const { return fCullRect; } |
| 119 | 119 |
| 120 /** Return a non-zero, unique value representing the picture. | 120 /** Return a non-zero, unique value representing the picture. |
| 121 */ | 121 */ |
| 122 uint32_t uniqueID() const { return fUniqueID; } | 122 uint32_t uniqueID() const { return fUniqueID; } |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 | 290 |
| 291 friend class SkPictureRecorder; // SkRecord-based constructor. | 291 friend class SkPictureRecorder; // SkRecord-based constructor. |
| 292 friend class GrLayerHoister; // access to fRecord | 292 friend class GrLayerHoister; // access to fRecord |
| 293 friend class ReplaceDraw; | 293 friend class ReplaceDraw; |
| 294 friend class SkPictureUtils; | 294 friend class SkPictureUtils; |
| 295 friend class SkRecordedDrawable; | 295 friend class SkRecordedDrawable; |
| 296 }; | 296 }; |
| 297 SK_COMPILE_ASSERT(sizeof(SkPicture) <= 96, SkPictureSize); | 297 SK_COMPILE_ASSERT(sizeof(SkPicture) <= 96, SkPictureSize); |
| 298 | 298 |
| 299 #endif | 299 #endif |
| OLD | NEW |