Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
SkEmptyPicture Class Referencefinal
Inheritance diagram for SkEmptyPicture:
SkPicture SkRefCnt SkRefCntBase

Public Member Functions

void playback (SkCanvas *, AbortCallback *) const override
 
size_t approximateBytesUsed () const override
 
int approximateOpCount (bool nested) const override
 
SkRect cullRect () const override
 
- Public Member Functions inherited from SkPicture
 ~SkPicture () override
 
virtual void playback (SkCanvas *canvas, AbortCallback *callback=nullptr) const =0
 
virtual SkRect cullRect () const =0
 
uint32_t uniqueID () const
 
sk_sp< SkDataserialize (const SkSerialProcs *procs=nullptr) const
 
void serialize (SkWStream *stream, const SkSerialProcs *procs=nullptr) const
 
virtual int approximateOpCount (bool nested=false) const =0
 
virtual size_t approximateBytesUsed () const =0
 
sk_sp< SkShadermakeShader (SkTileMode tmx, SkTileMode tmy, SkFilterMode mode, const SkMatrix *localMatrix, const SkRect *tileRect) const
 
sk_sp< SkShadermakeShader (SkTileMode tmx, SkTileMode tmy, SkFilterMode mode) const
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 

Additional Inherited Members

- Static Public Member Functions inherited from SkPicture
static sk_sp< SkPictureMakeFromStream (SkStream *stream, const SkDeserialProcs *procs=nullptr)
 
static sk_sp< SkPictureMakeFromData (const SkData *data, const SkDeserialProcs *procs=nullptr)
 
static sk_sp< SkPictureMakeFromData (const void *data, size_t size, const SkDeserialProcs *procs=nullptr)
 
static sk_sp< SkPictureMakePlaceholder (SkRect cull)
 

Detailed Description

Definition at line 58 of file SkPictureRecorder.cpp.

Member Function Documentation

◆ approximateBytesUsed()

size_t SkEmptyPicture::approximateBytesUsed ( ) const
inlineoverridevirtual

Returns the approximate byte size of SkPicture. Does not include large objects referenced by SkPicture.

Returns
approximate size

example: https://fiddle.skia.org/c/@Picture_approximateBytesUsed

Implements SkPicture.

Definition at line 62 of file SkPictureRecorder.cpp.

62{ return sizeof(*this); }

◆ approximateOpCount()

int SkEmptyPicture::approximateOpCount ( bool  nested) const
inlineoverridevirtual

Returns the approximate number of operations in SkPicture. Returned value may be greater or less than the number of SkCanvas calls recorded: some calls may be recorded as more than one operation, other calls may be optimized away.

Parameters
nestedif true, include the op-counts of nested pictures as well, else just return count the ops in the top-level picture.
Returns
approximate operation count

example: https://fiddle.skia.org/c/@Picture_approximateOpCount

Implements SkPicture.

Definition at line 63 of file SkPictureRecorder.cpp.

63{ return 0; }

◆ cullRect()

SkRect SkEmptyPicture::cullRect ( ) const
inlineoverridevirtual

Returns cull SkRect for this picture, passed in when SkPicture was created. Returned SkRect does not specify clipping SkRect for SkPicture; cull is hint of SkPicture bounds.

SkPicture is free to discard recorded drawing commands that fall outside cull.

Returns
bounds passed when SkPicture was created

example: https://fiddle.skia.org/c/@Picture_cullRect

Implements SkPicture.

Definition at line 64 of file SkPictureRecorder.cpp.

64{ return SkRect::MakeEmpty(); }
static constexpr SkRect MakeEmpty()
Definition: SkRect.h:595

◆ playback()

void SkEmptyPicture::playback ( SkCanvas canvas,
AbortCallback callback 
) const
inlineoverridevirtual

Replays the drawing commands on the specified canvas. In the case that the commands are recorded, each command in the SkPicture is sent separately to canvas.

To add a single command to draw SkPicture to recording canvas, call SkCanvas::drawPicture instead.

Parameters
canvasreceiver of drawing commands
callbackallows interruption of playback

example: https://fiddle.skia.org/c/@Picture_playback

Implements SkPicture.

Definition at line 60 of file SkPictureRecorder.cpp.

60{ }

The documentation for this class was generated from the following file: