Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
IntDrawable Class Reference
Inheritance diagram for IntDrawable:
SkDrawable SkFlattenable SkRefCnt SkRefCntBase

Public Member Functions

 IntDrawable (uint32_t a, uint32_t b, uint32_t c, uint32_t d)
 
void flatten (SkWriteBuffer &buffer) const override
 
Factory getFactory () const override
 
uint32_t a () const
 
uint32_t b () const
 
uint32_t c () const
 
uint32_t d () const
 
const char * getTypeName () const override
 
- Public Member Functions inherited from SkDrawable
void draw (SkCanvas *, const SkMatrix *=nullptr)
 
void draw (SkCanvas *, SkScalar x, SkScalar y)
 
std::unique_ptr< GpuDrawHandlersnapGpuDrawHandler (GrBackendApi backendApi, const SkMatrix &matrix, const SkIRect &clipBounds, const SkImageInfo &bufferInfo)
 
sk_sp< SkPicturemakePictureSnapshot ()
 
uint32_t getGenerationID ()
 
SkRect getBounds ()
 
size_t approximateBytesUsed ()
 
void notifyDrawingChanged ()
 
SkFlattenable::Type getFlattenableType () const override
 
Factory getFactory () const override
 
const char * getTypeName () const override
 
- Public Member Functions inherited from SkFlattenable
 SkFlattenable ()
 
virtual Factory getFactory () const =0
 
virtual const char * getTypeName () const =0
 
virtual void flatten (SkWriteBuffer &) const
 
virtual Type getFlattenableType () const =0
 
sk_sp< SkDataserialize (const SkSerialProcs *=nullptr) const
 
size_t serialize (void *memory, size_t memory_size, const SkSerialProcs *=nullptr) const
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 

Static Public Member Functions

static sk_sp< SkFlattenableCreateProc (SkReadBuffer &buffer)
 
- Static Public Member Functions inherited from SkDrawable
static SkFlattenable::Type GetFlattenableType ()
 
static sk_sp< SkDrawableDeserialize (const void *data, size_t size, const SkDeserialProcs *procs=nullptr)
 
- Static Public Member Functions inherited from SkFlattenable
static Factory NameToFactory (const char name[])
 
static const char * FactoryToName (Factory)
 
static void Register (const char name[], Factory)
 
static sk_sp< SkFlattenableDeserialize (Type, const void *data, size_t length, const SkDeserialProcs *procs=nullptr)
 

Protected Member Functions

SkRect onGetBounds () override
 
void onDraw (SkCanvas *) override
 
- Protected Member Functions inherited from SkDrawable
 SkDrawable ()
 
virtual SkRect onGetBounds ()=0
 
virtual size_t onApproximateBytesUsed ()
 
virtual void onDraw (SkCanvas *)=0
 
virtual std::unique_ptr< GpuDrawHandleronSnapGpuDrawHandler (GrBackendApi, const SkMatrix &, const SkIRect &, const SkImageInfo &)
 
virtual std::unique_ptr< GpuDrawHandleronSnapGpuDrawHandler (GrBackendApi, const SkMatrix &)
 
virtual sk_sp< SkPictureonMakePictureSnapshot ()
 

Additional Inherited Members

- Public Types inherited from SkFlattenable
enum  Type {
  kSkColorFilter_Type , kSkBlender_Type , kSkDrawable_Type , kSkDrawLooper_Type ,
  kSkImageFilter_Type , kSkMaskFilter_Type , kSkPathEffect_Type , kSkShader_Type
}
 
typedef sk_sp< SkFlattenable >(* Factory) (SkReadBuffer &)
 

Detailed Description

Definition at line 32 of file FlattenDrawableTest.cpp.

Constructor & Destructor Documentation

◆ IntDrawable()

IntDrawable::IntDrawable ( uint32_t  a,
uint32_t  b,
uint32_t  c,
uint32_t  d 
)
inline

Definition at line 34 of file FlattenDrawableTest.cpp.

35 : fA(a)
36 , fB(b)
37 , fC(c)
38 , fD(d)
39 {}
uint32_t b() const
uint32_t d() const
uint32_t a() const
uint32_t c() const

Member Function Documentation

◆ a()

uint32_t IntDrawable::a ( ) const
inline

Definition at line 58 of file FlattenDrawableTest.cpp.

58{ return fA; }

◆ b()

uint32_t IntDrawable::b ( ) const
inline

Definition at line 59 of file FlattenDrawableTest.cpp.

59{ return fB; }

◆ c()

uint32_t IntDrawable::c ( ) const
inline

Definition at line 60 of file FlattenDrawableTest.cpp.

60{ return fC; }

◆ CreateProc()

static sk_sp< SkFlattenable > IntDrawable::CreateProc ( SkReadBuffer buffer)
inlinestatic

Definition at line 48 of file FlattenDrawableTest.cpp.

48 {
49 uint32_t a = buffer.readUInt();
50 uint32_t b = buffer.readUInt();
51 uint32_t c = buffer.readUInt();
52 uint32_t d = buffer.readUInt();
53 return sk_sp<IntDrawable>(new IntDrawable(a, b, c, d));
54 }
IntDrawable(uint32_t a, uint32_t b, uint32_t c, uint32_t d)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
Definition: switches.h:126

◆ d()

uint32_t IntDrawable::d ( ) const
inline

Definition at line 61 of file FlattenDrawableTest.cpp.

61{ return fD; }

◆ flatten()

void IntDrawable::flatten ( SkWriteBuffer ) const
inlineoverridevirtual

Override this if your subclass needs to record data that it will need to recreate itself from its CreateProc (returned by getFactory()).

DEPRECATED public : will move to protected ... use serialize() instead

Reimplemented from SkFlattenable.

Definition at line 41 of file FlattenDrawableTest.cpp.

41 {
42 buffer.writeUInt(fA);
43 buffer.writeUInt(fB);
44 buffer.writeUInt(fC);
45 buffer.writeUInt(fD);
46 }

◆ getFactory()

Factory IntDrawable::getFactory ( ) const
inlineoverridevirtual

Implement this to return a factory function pointer that can be called to recreate your class given a buffer (previously written to by your override of flatten().

Reimplemented from SkDrawable.

Definition at line 56 of file FlattenDrawableTest.cpp.

56{ return CreateProc; }
static sk_sp< SkFlattenable > CreateProc(SkReadBuffer &buffer)

◆ getTypeName()

const char * IntDrawable::getTypeName ( ) const
inlineoverridevirtual

Returns the name of the object's class.

Reimplemented from SkDrawable.

Definition at line 63 of file FlattenDrawableTest.cpp.

63{ return "IntDrawable"; }

◆ onDraw()

void IntDrawable::onDraw ( SkCanvas )
inlineoverrideprotectedvirtual

Implements SkDrawable.

Definition at line 67 of file FlattenDrawableTest.cpp.

67{}

◆ onGetBounds()

SkRect IntDrawable::onGetBounds ( )
inlineoverrideprotectedvirtual

Implements SkDrawable.

Definition at line 66 of file FlattenDrawableTest.cpp.

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

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