OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
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 #ifndef SkPictureRecorder_DEFINED | 8 #ifndef SkPictureRecorder_DEFINED |
9 #define SkPictureRecorder_DEFINED | 9 #define SkPictureRecorder_DEFINED |
10 | 10 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
68 * must call unref() when they are done using it. | 68 * must call unref() when they are done using it. |
69 * | 69 * |
70 * The returned picture is immutable. If during recording drawables were ad ded to the canvas, | 70 * The returned picture is immutable. If during recording drawables were ad ded to the canvas, |
71 * these will have been "drawn" into a recording canvas, so that this resul ting picture will | 71 * these will have been "drawn" into a recording canvas, so that this resul ting picture will |
72 * reflect their current state, but will not contain a live reference to th e drawables | 72 * reflect their current state, but will not contain a live reference to th e drawables |
73 * themselves. | 73 * themselves. |
74 */ | 74 */ |
75 SkPicture* SK_WARN_UNUSED_RESULT endRecordingAsPicture(); | 75 SkPicture* SK_WARN_UNUSED_RESULT endRecordingAsPicture(); |
76 | 76 |
77 /** | 77 /** |
78 * Signal that the caller is done recording, and update the parameters to u se for bounding | |
79 * box hierarchy (BBH) generation. The behavior is the same as calling | |
80 * endRecordingAsPicture(), except that this method updates the parameters initially passed | |
81 * into beginRecording. | |
82 * @param cullRect the new culling rectangle to use as the overall bound fo r BBH generation | |
83 * and subsequent culling operations. | |
84 * @param bbhFactory factory to create desired acceleration structure. Any existing factory | |
85 * is cleared. | |
86 * @return the picture containing the recorded content. | |
87 */ | |
88 SkPicture* SK_WARN_UNUSED_RESULT endRecordingAsPicture(const SkRect& cullRec t, | |
89 SkBBHFactory* bbhFact ory = NULL); | |
mtklein
2015/07/07 19:18:16
Let's kill off bbhFactory too?
The factory and cu
| |
90 | |
91 /** | |
78 * Signal that the caller is done recording. This invalidates the canvas re turned by | 92 * Signal that the caller is done recording. This invalidates the canvas re turned by |
79 * beginRecording/getRecordingCanvas. Ownership of the object is passed to the caller, who | 93 * beginRecording/getRecordingCanvas. Ownership of the object is passed to the caller, who |
80 * must call unref() when they are done using it. | 94 * must call unref() when they are done using it. |
81 * | 95 * |
82 * Unlike endRecordingAsPicture(), which returns an immutable picture, the returned drawable | 96 * Unlike endRecordingAsPicture(), which returns an immutable picture, the returned drawable |
83 * may contain live references to other drawables (if they were added to th e recording canvas) | 97 * may contain live references to other drawables (if they were added to th e recording canvas) |
84 * and therefore this drawable will reflect the current state of those nest ed drawables anytime | 98 * and therefore this drawable will reflect the current state of those nest ed drawables anytime |
85 * it is drawn or a new picture is snapped from it (by calling drawable->ne wPictureSnapshot()). | 99 * it is drawn or a new picture is snapped from it (by calling drawable->ne wPictureSnapshot()). |
86 */ | 100 */ |
87 SkDrawable* SK_WARN_UNUSED_RESULT endRecordingAsDrawable(); | 101 SkDrawable* SK_WARN_UNUSED_RESULT endRecordingAsDrawable(); |
(...skipping 18 matching lines...) Expand all Loading... | |
106 SkRect fCullRect; | 120 SkRect fCullRect; |
107 SkAutoTUnref<SkBBoxHierarchy> fBBH; | 121 SkAutoTUnref<SkBBoxHierarchy> fBBH; |
108 SkAutoTUnref<SkRecorder> fRecorder; | 122 SkAutoTUnref<SkRecorder> fRecorder; |
109 SkAutoTUnref<SkRecord> fRecord; | 123 SkAutoTUnref<SkRecord> fRecord; |
110 SkMiniRecorder fMiniRecorder; | 124 SkMiniRecorder fMiniRecorder; |
111 | 125 |
112 typedef SkNoncopyable INHERITED; | 126 typedef SkNoncopyable INHERITED; |
113 }; | 127 }; |
114 | 128 |
115 #endif | 129 #endif |
OLD | NEW |