Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
SkPicture::AbortCallback Class Referenceabstract

#include <SkPicture.h>

Inheritance diagram for SkPicture::AbortCallback:
JustOneDraw

Public Member Functions

virtual ~AbortCallback ()=default
 
virtual bool abort ()=0
 

Protected Member Functions

 AbortCallback ()=default
 
 AbortCallback (const AbortCallback &)=delete
 
AbortCallbackoperator= (const AbortCallback &)=delete
 

Detailed Description

AbortCallback is an abstract class. An implementation of AbortCallback may passed as a parameter to SkPicture::playback, to stop it before all drawing commands have been processed.

If AbortCallback::abort returns true, SkPicture::playback is interrupted.

Definition at line 97 of file SkPicture.h.

Constructor & Destructor Documentation

◆ ~AbortCallback()

virtual SkPicture::AbortCallback::~AbortCallback ( )
virtualdefault

Has no effect.

◆ AbortCallback() [1/2]

SkPicture::AbortCallback::AbortCallback ( )
protecteddefault

◆ AbortCallback() [2/2]

SkPicture::AbortCallback::AbortCallback ( const AbortCallback )
protecteddelete

Member Function Documentation

◆ abort()

virtual bool SkPicture::AbortCallback::abort ( )
pure virtual

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

Implemented in JustOneDraw.

◆ operator=()

AbortCallback & SkPicture::AbortCallback::operator= ( const AbortCallback )
protecteddelete

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