Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
JustOneDraw Class Reference
Inheritance diagram for JustOneDraw:
SkPicture::AbortCallback

Public Member Functions

 JustOneDraw ()
 
bool abort () override
 
- Public Member Functions inherited from SkPicture::AbortCallback
virtual ~AbortCallback ()=default
 

Additional Inherited Members

- Protected Member Functions inherited from SkPicture::AbortCallback
 AbortCallback ()=default
 
 AbortCallback (const AbortCallback &)=delete
 
AbortCallbackoperator= (const AbortCallback &)=delete
 

Detailed Description

Definition at line 35 of file RecordDrawTest.cpp.

Constructor & Destructor Documentation

◆ JustOneDraw()

JustOneDraw::JustOneDraw ( )
inline

Definition at line 37 of file RecordDrawTest.cpp.

37: fCalls(0) {}

Member Function Documentation

◆ abort()

bool JustOneDraw::abort ( )
inlineoverridevirtual

Stops SkPicture playback when some condition is met. A subclass of AbortCallback provides an override for abort() that can stop SkPicture::playback.

The part of SkPicture drawn when aborted is undefined. SkPicture instantiations are free to stop drawing at different points during playback.

If the abort happens inside one or more calls to SkCanvas::save(), stack of SkCanvas matrix and SkCanvas clip values is restored to its state before SkPicture::playback was called.

Returns
true to stop playback

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

Implements SkPicture::AbortCallback.

Definition at line 39 of file RecordDrawTest.cpp.

39{ return fCalls++ > 0; }

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