Lines Matching defs:SkPicture
27 /** \class SkPicture
28 SkPicture records drawing commands made to SkCanvas. The command stream may be
31 SkPicture is an abstract class. SkPicture may be generated by SkPictureRecorder
32 or SkDrawable, or from SkPicture previously saved to SkData or SkStream.
34 SkPicture may contain any SkCanvas drawing command, as well as one or more
35 SkCanvas matrix or SkCanvas clip. SkPicture has a cull SkRect, which is used as
36 a bounding box hint. To limit SkPicture bounds, use SkCanvas clip when
37 recording or drawing SkPicture.
39 class SK_API SkPicture : public SkRefCnt {
41 ~SkPicture() override;
43 /** Recreates SkPicture that was serialized into a stream. Returns constructed SkPicture
45 constructing valid SkPicture.
47 procs->fPictureProc permits supplying a custom function to decode SkPicture.
54 @return SkPicture constructed from stream data
56 static sk_sp<SkPicture> MakeFromStream(SkStream* stream,
59 /** Recreates SkPicture that was serialized into data. Returns constructed SkPicture
61 constructing valid SkPicture.
63 procs->fPictureProc permits supplying a custom function to decode SkPicture.
70 @return SkPicture constructed from data
72 static sk_sp<SkPicture> MakeFromData(const SkData* data,
80 @return SkPicture constructed from data
82 static sk_sp<SkPicture> MakeFromData(const void* data, size_t size,
85 /** \class SkPicture::AbortCallback
87 passed as a parameter to SkPicture::playback, to stop it before all drawing
90 If AbortCallback::abort returns true, SkPicture::playback is interrupted.
98 /** Stops SkPicture playback when some condition is met. A subclass of
99 AbortCallback provides an override for abort() that can stop SkPicture::playback.
101 The part of SkPicture drawn when aborted is undefined. SkPicture instantiations are
106 SkPicture::playback was called.
121 commands are recorded, each command in the SkPicture is sent separately to canvas.
123 To add a single command to draw SkPicture to recording canvas, call
133 /** Returns cull SkRect for this picture, passed in when SkPicture was created.
134 Returned SkRect does not specify clipping SkRect for SkPicture; cull is hint
135 of SkPicture bounds.
137 SkPicture is free to discard recorded drawing commands that fall outside
140 @return bounds passed when SkPicture was created
146 /** Returns a non-zero value unique among SkPicture in Skia process.
148 @return identifier for SkPicture
152 /** Returns storage containing SkData describing SkPicture, using optional custom
155 procs->fPictureProc permits supplying a custom function to encode SkPicture.
158 is called with a pointer to SkPicture and user context.
161 @return storage containing serialized SkPicture
169 procs->fPictureProc permits supplying a custom function to encode SkPicture.
172 is called with a pointer to SkPicture and user context.
181 /** Returns a placeholder SkPicture. Result does not draw, and contains only
193 static sk_sp<SkPicture> MakePlaceholder(SkRect cull);
195 /** Returns the approximate number of operations in SkPicture. Returned value
208 /** Returns the approximate byte size of SkPicture. Does not include large objects
209 referenced by SkPicture.
239 SkPicture();
247 static sk_sp<SkPicture> MakeFromStream(SkStream*, const SkDeserialProcs*,
269 static sk_sp<SkPicture> Forwardport(const struct SkPictInfo&,