Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
dart::TypedDataViewMessageSerializationCluster Class Reference
Inheritance diagram for dart::TypedDataViewMessageSerializationCluster:
dart::MessageSerializationCluster dart::ZoneAllocated

Public Member Functions

 TypedDataViewMessageSerializationCluster (Zone *zone, intptr_t cid)
 
 ~TypedDataViewMessageSerializationCluster ()
 
void Trace (MessageSerializer *s, Object *object)
 
void WriteNodes (MessageSerializer *s)
 
void WriteEdges (MessageSerializer *s)
 
void TraceApi (ApiMessageSerializer *s, Dart_CObject *object)
 
void WriteNodesApi (ApiMessageSerializer *s)
 
- Public Member Functions inherited from dart::MessageSerializationCluster
 MessageSerializationCluster (const char *name, MessagePhase phase, intptr_t cid, bool is_canonical=false)
 
virtual ~MessageSerializationCluster ()
 
virtual void Trace (MessageSerializer *s, Object *object)=0
 
virtual void WriteNodes (MessageSerializer *s)=0
 
virtual void WriteEdges (MessageSerializer *s)
 
virtual void TraceApi (ApiMessageSerializer *s, Dart_CObject *object)
 
virtual void WriteNodesApi (ApiMessageSerializer *s)
 
virtual void WriteEdgesApi (ApiMessageSerializer *s)
 
const char * name () const
 
MessagePhase phase () const
 
intptr_t cid () const
 
bool is_canonical () const
 
- Public Member Functions inherited from dart::ZoneAllocated
 ZoneAllocated ()
 
void * operator new (size_t size)
 
void * operator new (size_t size, Zone *zone)
 
void operator delete (void *pointer)
 

Additional Inherited Members

- Protected Member Functions inherited from dart::MessageSerializationCluster
 DISALLOW_COPY_AND_ASSIGN (MessageSerializationCluster)
 
- Protected Attributes inherited from dart::MessageSerializationCluster
const char *const name_
 
const MessagePhase phase_
 
const intptr_t cid_
 
const bool is_canonical_
 

Detailed Description

Definition at line 1502 of file message_snapshot.cc.

Constructor & Destructor Documentation

◆ TypedDataViewMessageSerializationCluster()

dart::TypedDataViewMessageSerializationCluster::TypedDataViewMessageSerializationCluster ( Zone zone,
intptr_t  cid 
)
inlineexplicit

Definition at line 1505 of file message_snapshot.cc.

1506 : MessageSerializationCluster("TypedDataView",
1508 cid),
1509 objects_(zone, 0) {}
MessageSerializationCluster(const char *name, MessagePhase phase, intptr_t cid, bool is_canonical=false)

◆ ~TypedDataViewMessageSerializationCluster()

dart::TypedDataViewMessageSerializationCluster::~TypedDataViewMessageSerializationCluster ( )
inline

Definition at line 1510 of file message_snapshot.cc.

1510{}

Member Function Documentation

◆ Trace()

void dart::TypedDataViewMessageSerializationCluster::Trace ( MessageSerializer s,
Object object 
)
inlinevirtual

Implements dart::MessageSerializationCluster.

Definition at line 1512 of file message_snapshot.cc.

1512 {
1513 TypedDataView* view = static_cast<TypedDataView*>(object);
1514 objects_.Add(view);
1515
1516 s->Push(view->untag()->length());
1517 s->Push(view->untag()->typed_data());
1518 s->Push(view->untag()->offset_in_bytes());
1519 }
struct MyStruct s

◆ TraceApi()

void dart::TypedDataViewMessageSerializationCluster::TraceApi ( ApiMessageSerializer s,
Dart_CObject object 
)
inlinevirtual

Reimplemented from dart::MessageSerializationCluster.

Definition at line 1541 of file message_snapshot.cc.

1541 {
1543 objects_.Add(reinterpret_cast<TypedDataView*>(object));
1544 }
@ Dart_CObject_kUnmodifiableExternalTypedData
#define ASSERT(E)
Dart_CObject_Type type

◆ WriteEdges()

void dart::TypedDataViewMessageSerializationCluster::WriteEdges ( MessageSerializer s)
inlinevirtual

Reimplemented from dart::MessageSerializationCluster.

Definition at line 1531 of file message_snapshot.cc.

1531 {
1532 const intptr_t count = objects_.length();
1533 for (intptr_t i = 0; i < count; i++) {
1534 TypedDataView* view = objects_[i];
1535 s->WriteRef(view->untag()->length());
1536 s->WriteRef(view->untag()->typed_data());
1537 s->WriteRef(view->untag()->offset_in_bytes());
1538 }
1539 }
int count
Definition: FontMgrTest.cpp:50

◆ WriteNodes()

void dart::TypedDataViewMessageSerializationCluster::WriteNodes ( MessageSerializer s)
inlinevirtual

Implements dart::MessageSerializationCluster.

Definition at line 1521 of file message_snapshot.cc.

1521 {
1522 const intptr_t count = objects_.length();
1523 s->WriteUnsigned(count);
1525 for (intptr_t i = 0; i < count; i++) {
1526 TypedDataView* view = objects_[i];
1527 s->AssignRef(view);
1528 }
1529 }
@ kTypedDataViewFromDart

◆ WriteNodesApi()

void dart::TypedDataViewMessageSerializationCluster::WriteNodesApi ( ApiMessageSerializer s)
inlinevirtual

Reimplemented from dart::MessageSerializationCluster.

Definition at line 1546 of file message_snapshot.cc.

1546 {
1548
1549 intptr_t count = objects_.length();
1550 s->WriteUnsigned(count);
1552 for (intptr_t i = 0; i < count; i++) {
1553 Dart_CObject* data = reinterpret_cast<Dart_CObject*>(objects_[i]);
1554 s->AssignRef(data);
1555
1556 intptr_t length = data->value.as_external_typed_data.length;
1557 s->WriteUnsigned(length);
1558
1559 s->finalizable_data()->Put(length * element_size,
1560 data->value.as_external_typed_data.data,
1561 data->value.as_external_typed_data.peer,
1562 data->value.as_external_typed_data.callback);
1563 }
1564 }
static size_t element_size(Layout layout, SkSLType type)
intptr_t ElementSizeInBytes() const
Definition: object.h:11531
size_t length
@ kTypedDataViewFromC
static int8_t data[kExtLength]

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